pew
pew copied to clipboard
/usr/lib64/python3.10/site-packages not included in sys.path even with globalsitepackages enabled
Originally reported by @sanjayankur31 in Red Hat Bugzilla #2011899.
Steps to reproduce
- Create new env with pew:
pew new test
- Check path:
$ python3 -c "import sys; print(sys.path)"
['', '/usr/lib64/python310.zip', '/usr/lib64/python3.10', '/usr/lib64/python3.10/lib-dynload', '/home/asinha/.local/share/virtualenvs/test/lib64/python3.10/site-packages', '/home/asinha/.local/share/virtualenvs/test/lib/python3.10/site-packages']
- Toggle
globalsitepackages
to check if they're enabled:
$ pew toggleglobalsitepackages
Disabled global site-packages
$ pew toggleglobalsitepackages
Enabled global site-packages
- Check path again:
$ python3 -c "import sys; print(sys.path)"
['', '/usr/lib64/python310.zip', '/usr/lib64/python3.10', '/usr/lib64/python3.10/lib-dynload', '/home/asinha/.local/share/virtualenvs/test/lib64/python3.10/site-packages', '/home/asinha/.local/share/virtualenvs/test/lib/python3.10/site-packages']
Actual results
/usr/lib64/python3.10/site-packages
is not in sys.path
.
Expected results
/usr/lib64/python3.10/site-packages
is included in sys.path
when global site packages are enabled.