Python venv 使用系统 python?

Python venv using system python?

为什么python -m venv py38还在使用系统python??

这严重地烧毁了我,我有一个非常定制的 python 3.8 环境,我认为它与 venv 宣传的系统隔离,我的系统 python 刚刚升级到 3.9,现在我必须重新构建所有内容。

任何有关创建实际隔离 python 环境的建议都将不胜感激。

https://docs.python.org/3/library/venv.html

Running this command creates the target directory (creating any parent directories that don’t exist already) and places a pyvenv.cfg file in it with a home key pointing to the Python installation from which the command was run (a common name for the target directory is .venv). It also creates a bin (or Scripts on Windows) subdirectory containing a copy/symlink of the Python binary/binaries (as appropriate for the platform or arguments used at environment creation time).

这让我觉得可能没有 python 安装的副本,而是 link 安装的副本。

反正pyenv.cfg应该有你python的路径,建议改一下