Install Python 2.7 - I recommend Anaconda as it comes with pip and other useful scientific/engineering modules
Install Pip (if not bundled with the Python distribution)
Install virtualenv
In the packages.zip there is virtualenv-15.1.0-py2.py3-none-any.whl. Extract that somewhere and install using
pip install virtualenv-15.1.0-py2.py3-none-any.whl
Extract the zip file 'Rollout_Att1.zip' somewhere. Navigate to that folder (let's call this /webapp/root/ from here on. You might as well delete the entire folder named 'env' because we are about to build a new one from scratch.
From the /webapp/root/ folder of above, make a virtualenv named 'env' (could be named anything) and activate it via command line.
virtualenv envenv/Scripts/activate.bat
Extract all needed packages somewhere ('/local/dir/' below) then use pip to install. Should be something like one of the following. Requirements.txt is in the /webapp/root/ folder extracted in step 4 above:
Extract the three folders in my-site-packages.zip into the directory env/Lib/site-packages that is created when you create a virtualenv name 'env' in step 5 above. So it should be /webapp/root/env/Lib/site-packages
Install apache2.4 VC9 or 10... but might as well try it on VC14 if its already installed
Install mod_wsgi
For python 2.7, apache 2.4, win x64, use VC10/VC9 - (Apache24-win64-VC10) > (mod_wsgi-py27-VC9.so)
mod_wsgi-windows-4.4.12.tar.gz
mod_wsgi-windows-4.4.12.tar.gz
Then move the appropriate module (see above -- mod_wsgi-py27-VC9.so) file to the modules folder and rename to just "mod_wsgi.so"
Add the below to httpd.conf. You might also want to add a virtual host if this is going to be run through the same apache installation as other web apps.
WSGIApplicationGroup %{GLOBAL} is need for numpy and pandas I think
## mod wsgi_
WSGIRestrictStdout Off #allows 'prints' to print to apache error log
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias / C:\webapp\root\myapp.wsgi
DocumentRoot "C:\webapp\root"
<Directory C:\webapp\root>
WSGIApplicationGroup %{GLOBAL}
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
Had to free up port 80 for apache to listen on by disabling the following services:
Print Spooler
SSDP Discovery
SQL Server Reporting Services (MSSQLSERVER)
but may be others as well, use
netstat -abno
to find the PID. If its 4, its a system process and difficult to find
(Optional) Install as a windows service so it can start automatically using the follow from an elevate cmd prompt
httpd.exe -k install -n "Apache2.4"
but that will be run as "system" and not a normal user, so a trusted connection using pypyodbc to your sql database may break. Just change the service to log in as the user that has sql db permissions.
Install Python 2.7 - I recommend Anaconda as it comes with pip and other useful scientific/engineering modules
Install Pip (if not bundled with the Python distribution)
Install virtualenv In the packages.zip there is
virtualenv-15.1.0-py2.py3-none-any.whl
. Extract that somewhere and install usingpip install virtualenv-15.1.0-py2.py3-none-any.whl
Extract the zip file 'Rollout_Att1.zip' somewhere. Navigate to that folder (let's call this /webapp/root/ from here on. You might as well delete the entire folder named 'env' because we are about to build a new one from scratch.
From the /webapp/root/ folder of above, make a virtualenv named 'env' (could be named anything) and activate it via command line.
virtualenv env
env/Scripts/activate.bat
Extract the three folders in my-site-packages.zip into the directory env/Lib/site-packages that is created when you create a virtualenv name 'env' in step 5 above. So it should be /webapp/root/env/Lib/site-packages
Install apache2.4 VC9 or 10... but might as well try it on VC14 if its already installed
Install mod_wsgi
For python 2.7, apache 2.4, win x64, use VC10/VC9 - (Apache24-win64-VC10) > (mod_wsgi-py27-VC9.so) mod_wsgi-windows-4.4.12.tar.gz mod_wsgi-windows-4.4.12.tar.gz
Then move the appropriate module (see above -- mod_wsgi-py27-VC9.so) file to the modules folder and rename to just "mod_wsgi.so"
WSGIApplicationGroup %{GLOBAL}
is need for numpy and pandas I thinkHad to free up port 80 for apache to listen on by disabling the following services: Print Spooler SSDP Discovery SQL Server Reporting Services (MSSQLSERVER)
but may be others as well, use
netstat -abno
to find the PID. If its 4, its a system process and difficult to find
httpd.exe -k install -n "Apache2.4"
but that will be run as "system" and not a normal user, so a trusted connection using pypyodbc to your sql database may break. Just change the service to log in as the user that has sql db permissions.