virtualenv: site.getsitepackages() missing
The standard site.getsitepackages() function is not available in a virtualenv:
>>> import site
>>> site.getsitepackages()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'getsitepackages'
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 18 (4 by maintainers)
I’ve gotten this issue on Python 3.7.0, Windows 10, in a virtualenv.
As a workaround that seems to be holding, outside of the virtualenv, I did:
Then I simply edited the site.py in my virtualenv, and added the missing function:
It’s a hacky workaround, but hopefully this helps someone else.
I am seeing this on Mac, with virtualenv==20.0.34 and when trying to use pyre 0.0.56.