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:
- First navigate to the D: drive which has ample scratch storage space.
- 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 ).
- Run the command `virtualenv -p` This creates the virtual environment in your project folder.
- Navigate into your project directory.
- Run the activation.
- 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:
- cd D:
- mkdir myPyProject
- virtualenv -p “C:\Program Files\Python36\python” “D:\myPyProject”
- cd myPyProject
- pip install numPy