Pip default behavior conflicts with virtualenv?

There is a pip.conf file in ~/.pip. There I changed the flag user=true to user=false using the command gedit pip.conf, after which I am able to create virtual environment successfully.


what worked for me was to change the $VIRTUAL_ENV_DIRECTORY/pyvenv.cfg to include-system-site-packages = true seems hacky though.


You don't need to set the --user flag. After you create your virtualenv (virtualenv flask), activate it: source flask/bin/activate. Your shell should look something like (flask) ~>.

Once your virtualenv is activated, you should be able to pip install packages without issue. For example, pip install numpy. They'll be installed in: lib/python2.6/site-packages/ (for whatever version of Python you are using)