简体   繁体   English

这个“pyvenv.cfg”文件在哪里?

[英]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 ?我在下面引用了site模块文档,但我不知道“pyvenv.cfg”文件实际存在于何处。它是否仅存在于比sys/executable高一级的目录中?

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).如果一个名为“pyvenv.cfg”的文件存在sys.executable 上一个目录,则 sys.prefix 和 sys.exec_prefix 被设置为该目录,并且它还会检查站点包(sys.base_prefix 和 sys.base_exec_prefix 将始终是Python 安装的“真实”前缀)。 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;如果“pyvenv.cfg”(引导配置文件)包含设置为“false”(不区分大小写)以外的任何内容的键“include-system-site-packages”,系统级前缀仍将搜索站点- 包; otherwise they won't.否则他们不会。

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 .如果它被创建,它应该与可执行文件位于同一目录中,或者按照PEP 405位于上面的一个目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM