[REQUEST] Make it work within a virtualenv
See original GitHub issueIs your feature request related to a problem? Please describe. I tried to install this in a virtualenv, like I install Python packages in general. I could, but it crashed with an error:
Traceback (most recent call last):
File "/home/faassen/.virtualenvs/pytools3/bin/bpytop", line 5, in <module>
from bpytop import main
File "/home/faassen/.virtualenvs/pytools3/lib/python3.8/site-packages/bpytop.py", line 205, in <module>
for td in site.getsitepackages() + [site.getusersitepackages()]:
AttributeError: module 'site' has no attribute 'getsitepackages'
The reason is because virtualenv don’t (and I think cannot) support getsitepackages:
https://github.com/pypa/virtualenv/issues/737
Describe the solution you’d like
I would like bpytop to work in a virtualenv. From the code it looks like the sitepackages are consulted to figure out to load up some kind of theme. Perhaps using a setuptools entry point would be a more compatible way to pick up theme packages that doesn’t require this low level access?
Describe alternatives you’ve considered
I considered installing it in my system Python directly but I try to keep this clean of custom installations as much as possible.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
That seems to be working. Will be in next update.
@faassen Should be fixed in v1.0.26
Reopen this otherwise.