Reputation: 895
I give a quotation of site
module documentation below and i am not aware where “pyvenv.cfg” file actually exists.Does it just exist in a directory one level higher than sys/executable
's ?
If a file named “pyvenv.cfg” exists one directory above sys.executable, sys.prefix and sys.exec_prefix are set to that directory and it is also checked for site-packages (sys.base_prefix and sys.base_exec_prefix will always be the “real” prefixes of the Python installation). If “pyvenv.cfg” (a bootstrap configuration file) contains the key “include-system-site-packages” set to anything other than “false” (case-insensitive), the system-level prefixes will still also be searched for site-packages; otherwise they won’t.
Upvotes: 1
Views: 10093
Reputation: 799150
It doesn't exist unless it is created.
If ...
And if it is created, it should be in the same directory as the executable or one directory above as per PEP 405.
Upvotes: 1