wow yoo
wow yoo

Reputation: 895

Where does this “pyvenv.cfg” file exist?

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

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

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

Related Questions