I wanted to check out which Python interpreter was running under my virtual env so I just entered the virtualenv and used getsitepackages. This is what came out.
(test)~/Documents/Development/test$ python
Python 2.7.9 (default, Apr 7 2015, 07:58:25)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import site
>>> print site.getsitepackages()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'getsitepackages'
>>>
Is this normal behaviour when operating under a virtualenv? If possible how would I correct, or should I even bother?
A user has the same problem as you.
There is a known bug, that Python 2.7 isn't compatible with site.py
.
This bug is still open, since November 2012.
You have to leave virtualenv or use another version of Python.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With