Python import old version package instead of new one
Question: I install the library 'numpy1.11.0', 'pandas0.18.1', 'scipy0.17.1' with pip
into the site-packages. The problem is that when I import numpy and scipy in
my project, an old version which has also been installed is imported instead
of the new version:

    
    
    import numpy as np
    import pandas as pd
    import scipy as sc
    
    print(np.__version__)
    print(np.__file__)
    
    print(pd.__version__)
    print(pd.__file__)
    
    print(sc.__version__)
    print(sc.__file__)
    
    output:
    1.8.0rc1
    /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.pyc
    0.18.1
    /Library/Python/2.7/site-packages/pandas/__init__.pyc
    0.13.0b1
    /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/__init__.pyc
    
    

As only one pandas is installed, the newest version is imported correctly.

[![enter image description
here](http://i.stack.imgur.com/lIo0j.jpg)](http://i.stack.imgur.com/lIo0j.jpg)

Both of the python and site-packages have numpy and scipy.

How could I fix the problem, thanks!


Answer: You can use [virtualenv](https://virtualenv.pypa.io/en/stable/), install the
libraries you want in the version you want.

