pyvenv.cfg 是使用 Python 的 venv 模块创建虚拟环境时自动创建的配置文件,文件中列出了创建虚拟环境时使用的配置情况,其中的 home 值是创建虚拟环境时使用的全局 Python 二进制文件/解释器(the base Python that this virtual environment was created from,也就是你执行 python3 命令启动的那个)所在目录。因为你电脑全局安装的 Python 解释器是 Miniconda,它把 Python 二进制文件放在 /opt/miniconda3/bin 目录下,所以 home 的值是这个目录。
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). It also creates an (initially empty) lib/pythonX.Y/site-packages subdirectory (on Windows, this is Lib\site-packages ). If an existing directory is specified, it will be re-used.