This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients darrel.opry, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2022-03-14.23:57:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647302236.28.0.187800952169.issue46950@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-03-14 23:57:16eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, darrel.opry
2022-03-14 23:57:16eryksunsetmessageid: <1647302236.28.0.187800952169.issue46950@roundup.psfhosted.org>
2022-03-14 23:57:16eryksunlinkissue46950 messages
2022-03-14 23:57:16eryksuncreate