Action
This document will give you a quick overview of installing custom packages into python. There are two primary ways to do so, one is with pip install --user
and the other is virtualenv
; both have advantages and disadvantages.
Instructions
Using virtualenv
Here are the examples using virtualenv
, the benefit here is that in a shared space many users could collaborate on one custom instances of packages for their group if the venv is created inside a lab share.
Python 2.7
Here we see that numpy is not installed.
...
Code Block |
---|
ew2193@headnode7.rit.albany.edu:~/python_project 2.08 1.66 1.00 3/201 5951 1036 > deactivate ew2193@headnode7.rit.albany.edu:~/python_project 2.08 1.66 1.00 3/201 5951 1037 > python Python 2.7.5 (default, Nov 21 2015, 00:39:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named numpy >>> |
Python 3
Here is the same set of commands using python3 rather than python2. You will notice only slight changes from the python2 version.
...