【发布时间】:2021-10-29 20:49:24
【问题描述】:
我在 conda 中使用 Python 3.8,并使用 build 创建包。虽然在我的 Conda 环境中我已经有 setuptools 51.0 和 wheel 0.36,但每次我运行 python -m build --wheel 时都会看到以下消息:
Found existing installation: setuptools 49.2.1
Uninstalling setuptools-49.2.1:
Successfully uninstalled setuptools-49.2.1
Collecting wheel
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting setuptools>=51
Using cached setuptools-58.3.0-py3-none-any.whl (946 kB)
Installing collected packages: wheel, setuptools
Successfully installed setuptools-58.3.0 wheel-0.37.0
这里现有的包甚至不匹配我在 Conda 中的包,我认为我也不需要最新的包。谁能解释为什么会这样?
【问题讨论】:
-
build为每个构建使用新的干净虚拟环境。为什么你认为你不需要最新的setuptools? -
没有具体原因,就是觉得现有的包都还好。那么 build 每次都会在新的 venv 中安装最新的软件包是否正常?每次都这样做似乎有点重复。
-
是的,这很正常。
build这样做是为了确保一切都尽可能干净。
标签: python setuptools python-wheel