Issue
The title basically says it all. I have pip
and virtualenv
set up on my computer and some packages are installed globally. Is it possible to set up a virtual environment that doesn't know about the globally-installed packages?
For instance, numpy
has already been installed with pip install numpy
not in a virtualenv
.
If I run
virtualenv testenv
cd testenv/
source bin/activate.csh
python # which brings up a python prompt:
>>> import numpy
it knows what numpy
is. Is there anything I can do to make it forget about global installations when in a virtual environment?
Solution
Create virtualenv with --no-site-packages
:
virtualenv --no-site-packages myevenv
Answered By - Mikko Ohtamaa