I would like to include different Python libraries on my Mac, like numpy and other research libraries that aren't packaged by default with the Python installation. I should note that I installed the latest version of Python for mac from the official Python site. It installs in ~/Libraries/... rather than /usr/bin or /usr/local/bin. Would I need to include those new libraries with my updated version? ie. In the same directory? Thanks in advance!
            Asked
            
        
        
            Active
            
        
            Viewed 76 times
        
    2 Answers
1
            Consider using a virtualenv. E.g.
pip install virtualenv
virtualenv ~/.virtualenvs/science
source ~/.virtualenvs/science/bin/activate
pip install numpy scipy matplotlib ...
# work on your project
deactivate
virtualenv is a virtual enviornment for Python packages that avoids populating your default installation, besides other advantages. It is a standard in Python.
        Jorge Leitao
        
- 19,085
 - 19
 - 85
 - 121
 
0
            
            
        As a workaround, I use Macports to install it's own python executable and additional libraries like scipy/numpy/matplotlib.
Another alternative is to use bundles, this discussion might be of interest Anaconda vs. EPD Enthought vs. manual installation of Python