Installing Python Packages under Windows

////Installing Python Packages under Windows
Installing Python Packages under Windows 2017-09-15T18:54:29+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. 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 ). For example:
    1. mkdir myPyProject
  2. Run the command `virtualenv -p` This creates the virtual environment in your project folder. For example:
    1. virtualenv -p “C:\Program Files\Python36\python” “D:\myPyProject”
  3. Navigate into your project directory and activate it. For example:
    1. cd MyPyProject
    2. cd Scripts/activate

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

The following is a complete example of the steps above:

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