pew icon indicating copy to clipboard operation
pew copied to clipboard

/usr/lib64/python3.10/site-packages not included in sys.path even with globalsitepackages enabled

Open tjanez opened this issue 3 years ago • 0 comments

Originally reported by @sanjayankur31 in Red Hat Bugzilla #2011899.

Steps to reproduce

  1. Create new env with pew:
pew new test
  1. 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']
  1. Toggle globalsitepackages to check if they're enabled:
$ pew toggleglobalsitepackages
Disabled global site-packages

$ pew toggleglobalsitepackages
Enabled global site-packages
  1. 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.

tjanez avatar Feb 14 '22 21:02 tjanez