Installing Python Packages under Windows

////Installing Python Packages under Windows
Installing Python Packages under Windows 2018-04-04T14:22:06+00:00

Installing Python Packages under Windows

To install Python packages (“eggs”) from the Python language’s package manager pip, follow our instructions below. This can be done without Administrator access in a per-user, per-project clean manner with virtualenv. virtualenv is the industry-standard way of developing and running Python. Virtualenv is available in our environment for current Python 2 and Python 3 packages.

This Guide applies to the following MCECS labs where python 2 and 3 are installed:
EB General lab (Eb 325), FAB General Lab (FAB 55-17), MCAE Lab (EB 420) and Civil 3D lab (EB 385).


From a command prompt:

  1. First navigate to the D: drive which has ample scratch storage space.
  2. Create a directory to use for your python project in a location which you have write access ( such as N:\My Documents\myPyProject , D:\myPyProject ).
  3. Run the command `virtualenv -p` This creates the virtual environment in your project folder.
  4. Navigate into your project directory.
  5. Run the activation.
  6. Use pip to install your package of choice.

You should be returned with a prompt similar to: (myPyProject)>

The following is a complete example of the steps above:

  1. cd D:
  2. mkdir myPyProject
  3. virtualenv -p “C:\Program Files\Python36\python” “D:\myPyProject”
  4. cd myPyProject
  5. Scripts\activate
  6. pip install numPy

Note: Step 3 assumes the desired version of python is 3.6, hence python36. Link accordingly to your desired version otherwise.