Eryk Sun <eryk...@gmail.com> added the comment:

In 3.10, you should be able to work around the problem for the venv 
site-packages directory by setting the environment variable "PYTHONPLATLIBDIR" 
to "Lib". This sets sys.platlibdir, which the site module uses to create the 
site-packages directory. The default value is "lib", which isn't properly 
capitalized.

In 3.11, sys.platlibdir defaults to "DLLs" in Windows, and the site module 
ignores this attribute. However, the site module does hard code the properly 
capitalized value "Lib".

In POSIX, sys.platlibdir (e.g. "lib" or "lib64") is a common base directory for 
the standard library and its extension modules. It isn't just the directory for 
extension modules, as might be implied by changing the value to "DLLs" in 
Windows. The "DLLs" directory in Windows Python is split off from "Lib" (for 
some legacy reason, I suppose), so Windows would need separate sys.platlibdir 
("Lib") and sys.platextdir ("DLLs") values, if that mattered, which it doesn't 
since the names are fixed.

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46950>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to