Search code examples
pythonnumpypipvirtualenvvirtualenvwrapper

Why is pip trying to re-install numpy?


Following (add2virtualenv (virtualenv wrapper) does not work with scipy) I symlinked my site-packages numpy directory into my virtualenv site-packages. In my virtualenv, I can do import numpy with no problems.

However, when I try to do pip install pandas in the virtualenv, pip tries to re-install numpy. How can I make pip recognize that numpy is already installed?


Solution

  • As discussed in the comments, you can copy the .egg and the module directory into your virtualenv site-packages directory:

    sudo cp -r  path_to_system/numpy your_venv/lib/python3.4/site-packages/
    sudo cp -r  path_to_system/numpy-x.x.x-pyx.x.egg-info  your_venv/lib/python3.4/site-packages/