当setuptools已明确安装时,为什么在setuptools version=none的情况下出现pip安装错误?

2024-09-29 02:20:01 发布

您现在位置:Python中文网/ 问答频道 /正文

在redhat 7系统上工作。像pip这样的公用事业公司无法访问互联网。我们让它在系统上安装一个新版本的python 3.8.1,它成功地安装了pip 19.2.3和setuptools 41.2.0。我们使用这个版本的python来创建一个虚拟环境。在该虚拟环境中,我们使用pip从本地存储库安装库集合

在激活的虚拟环境中,该命令类似于:

pip install -r /location/to/our/requirements.txt --no-index --find-links file:///location/of/our/tarballs

执行时,流程会出错,并显示一些错误字符串,其中包括以下内容:

command: pip install -r /location/to/our/requirements.txt --no-index --find-links file:///location/of/our/tarballs -- 'setuptools >= 40.6.0' wheel
cwd: none
looking in links: /location/of/our/tarballs
Collecting setuptools>=40.6.0
ERROR: Could not find a version that satisfies the requirement setuptools>=40.6.0 (from versions:none)
ERROR: No matching distribution found for setuptools>=40.6.0

有人能解释为什么我们会出现这个错误吗

我们运行了pip列表,它清楚地显示了setuptools版本高于40。是否有我缺少的配置?引发此错误的第一个包是django-bootstrap-3.0.1

pip        19.2.3
setuptools 41.2.0

有趣的注释

我们的架构师在家里运行这个没有任何问题

我们在同一个盒子上有一个python3.6版本。可以安装我们的虚拟环境并安装python3.6软件包而不会出现问题


Tags: installpipofto版本系统错误虚拟环境