I assume here that you have python installed in your system. Or perhaps you have a package manager such as Anaconda or Canopy and that you have your path variables setup correctly. If you don't then head over to any of these pages and download a python installation to start with. I recommend Anaconda personnally. But use any one of your choice
Warning these files are usually large, so you may want to use a non-metered connection.
Having downloaded and installed a python distribution, you have to add their installed directories to your system path. Python gives you the option to specify if you want to add it to path during the installation process, so it may not be much of a problem. If you installed Anaconda, then add the following folders to your system path
if they were not already added during installation.
<path to anaconda installation>\anaconda
<path to anaconda installation>\anaconda\Scripts
In case you're on a system without admin rights, you can set user
environment variables by following these steps (System-wide environment variables is not required) to work with python virtual environments.
- Open
Run
dialog by pressingWindows Logo Key
+R
- Type
rundll32 sysdm.cpl,EditEnvironmentVariables
to open environment variables dialog - Edit the path settings to add the required directories.
pip install virtualenv
pip install virtualenvwrapper-win
To create a virtual environment use the below command (the -a
flag is optional. It only associates a directory with a virtual environment such that whenever you activate the environment, you're automagically cd
ed into that directory as well).
mkvirtualenv <envname> -a <path to a directory>` --no-site-packages
To activate the virtual environment use the below command
workon <envname>
In case you're interested, your newly created environment resides in %USERPROFILE%\Envs
by default. Just copy paste it into any open windows explorer
address bar and it'll lead straight to the directory where you have all your virtual environments.
If you want to change that location please consult resource number 3 below