Changes between Version 6 and Version 7 of UoL LAMP HowTo Install Python Flask Applications
- Timestamp:
- 10/01/18 14:23:50 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UoL LAMP HowTo Install Python Flask Applications
v6 v7 3 3 Tags: [[HowTo]] [[Install]] [[Pain in the proverbial]] [[UoL LAMP Server]] 4 4 5 == Difficulties 5 == Python 2 6 7 === Difficulties 6 8 7 9 This installations is made more difficult by 3 things: … … 12 14 4. Some other stuff that I don't quite understand 13 15 14 == Requirements16 === Requirements 15 17 16 18 Before installation can start, the following packages will have to be installed by IT services: … … 19 21 - python-dev 20 22 21 == Start Services23 === Start Services 22 24 23 25 Start the Apache and MySQL and make sure that they are restarted when the server is rebooted. … … 30 32 }}} 31 33 32 == Proceduce34 === Proceduce 33 35 34 36 1. Install {{{mod_wsgi.so}}} into the directory {{{/local/apache2/etc/}}} … … 109 111 }}} 110 112 111 == Gotchas113 === Gotchas 112 114 113 115 - [[Python Flask Gotchas Import Database Module Fails]] 114 116 117 == Python 3 118 119 === Create Environment 120 121 1. Add python 3 to your path by adding the following line to `.profile` file in your home directory: 122 123 {{{ 124 PATH=$PATH:/opt/python3/bin/ 125 }}} 126 127 You will need to log off and log back in to add the above to your current environment. 128 129 2. Change directory into `/local/` and create a virtual environment: 130 131 {{{ 132 cd /local/ && virtualenv --no-site-packages venv 133 }}} 134 135 3. Activate the virtual environment: 136 137 {{{ 138 source /local/venv/bin/activate 139 }}} 140 141 4. Download the application repository from GitHub, cd into the application directory and install the requirements by running the command: 142 143 {{{ 144 pip install -r requirements.txt 145 }}} 146 147 === Change Confirguration 148 115 149 [[BackLinks]]