How to install Python on Windows 7
https://www.python.org/download/releases/2.7/
-
Download msi for Windows x86/x64
-
Add to $PATH
C:\Python27;C:\Python27\Scripts\
-
Install virtualenv for Python
C:\pip install virtualenv
-
Create example directory
C:\myproject
-
Create virtualenv directorey like
C:\myproject\virtualenv venv
-
Put the source code into the created dir C:\myproject
-
Install requirements file:
C:\myproject\pip install -r requirements.txt
-
Go to Properties
Install on Linux:
-
Create virtualenv on the directory needed:
/home/b/myproject/ $ pip install virtualenv
-
Put file of the project there:
-
Install requirements
$ pip install -r requirements.txt
-
Go to Properties
main dir
./inet_radio
./inet_radiо/config.py - configuration file
Download log
DOWNLOAD_LOG='/home/b/myproject/inet_radio/static/music/downloaded/log_downloaded.txt'
Download files
DOWNLOAD_FILES='/home/b/myproject/inet_radio/static/music'
Download log
DOWNLOAD_LOG='C:\myproject\inet_radio\static\music\downloaded\log_downloaded.txt'
Download files
DOWNLOAD_FILES='C:\myproject\inet_radio\static\music'
Activate virtualenv
Virtualenv activation:
C:\myproject\cd venv\Scripts
C:\myproject\venv\Scripts\activate
Deactivation:
C:\myproject\venv\Scripts\deactivate
Start of the app:
C:\myproject\inet_radio\python app.py
In browser open:
http://0.0.0.0:5000/
/home/b/myproject $ . venv/bin/activate
Activated (venv):
(venv)/home/bor/myproject $
Start app:
(venv)/home/bor/myproject/inet_radio $ python app.py
In browser open:
http://0.0.0.0:5000/
Reference
-
How to setup flask for Windows https://www.youtube.com/watch?v=98JY6MvumVs
-
Python releases https://www.python.org/download/releases/2.7/
-
Instaling Python on Windows http://docs.python-guide.org/en/latest/starting/install/win/