antonagestam
antonagestam

Reputation: 4789

pip listing global packages in active virtualenv

After upgrading pip from 1.4.x to 1.5 pip freeze outputs a list of my globally installed (system) packages instead of the ones installed inside of my virtualenv. I've tried downgrading to 1.4 again but that does not solve my problem. It's somewhat similar to this question only it's been working as expected for months. Is there any way to debug and/or repair this?

It seems like the virtualenv has no effect at all. Installing packages within it installs them globally too.

Upvotes: 7

Views: 7890

Answers (2)

0 _
0 _

Reputation: 11504

Even if you have installed properly, but with global site packages visible to your virtualenv, still pip will list everything, unless you use pip list --local discussed here.

Upvotes: 2

DocZerø
DocZerø

Reputation: 8557

I had problems with pip installing packages globally instead of in the activated virtualenv too. Have a look at pip installing in global site-packages instead of virtualenv for the question (and the answer).

Basically, the solution consisted of modifying the shebang of the pip scripts within the virtualenv as they pointed to the wrong python installation.

Upvotes: 2

Related Questions