Installing Python On Windows
This article is an extension of my Udemy Course, Learn Python and the basics of programming with Donald Trump. This link contains my referral code.
1. Download
Go to the Python website and download the latest stable version of Python (3.6 or above).
Then you can run the installer. In the beginning check Install launcher for all Users and also Add Python 3.6 to PATH. This will make creating venv much easier.
2. INSTALL PIP
Pip (Python Package Installer), official documentation for pip.
Usually Python3 comes with pip preinstalled. If you get an error “pip command not found”, use the following command to install pip:
Download get-pip.py, make sure you’re saving file to Desktop
In your Command Prompt navigate to Desktop
cd Desktop
Execute get-pip.py
python get-pip.py
Now pip should work system wide.
INSTALL VIRTUALENV
In your Command Prompt enter:
pip install virtualenv
In your Command Prompt navigate to your project:
cd your_project
Within your project:
virtualenv env
On Windows, virtualenv creates a batch file \env\Scripts\activate.bat to activate virtualenv on Windows, activate script is in the Scripts folder: \path\to\env\Scripts\activate
Example:
C:\Users\’Username’\venv\Scripts\activate.bat
Final notes
This article is loosely adapted from Program With Us