WebFaction
Community site: login faq

I've created a virtualenv with virtualenvwrapper, and I created it with the --no-site-packages option. However, python can still see all of the system site packages, and when I try to install a new version of a package inside my virtualenv, it fails with an error such as:

(myvenv)$ pip install South==1.0.0
Collecting South==1.0.0
Installing collected packages: South
  Found existing installation: South 0.8.4
    Not uninstalling South at /home/myuser/lib/python2.7/South-0.8.4-py2.7.egg, outside environment /home/myuser/.virtualenvs/myvenv
Successfully installed South-0.8.4

And if I run pip freeze, I see all of the system packages plain as day. Any reason I would still be seeing all of this while my virtualenv is active?

asked 28 Jul '15, 17:44

bobtiki
119211
accept rate: 33%


There is a global site customization policy in our system Python installations, and virtualenv isn't able to ignore it.

To work around it, you can create an empty file named sitecustomize.py in your virtualenv's lib/python2.7 directory.

Hope that helps!

permanent link

answered 28 Jul '15, 17:50

seanf
12.2k42136
accept rate: 37%

Perfect, thank you! That works.

(28 Jul '15, 18:03) bobtiki
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×55
×54

question asked: 28 Jul '15, 17:44

question was seen: 3,867 times

last updated: 28 Jul '15, 18:03

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM