pip install 无法识别以前安装的软件包

问题描述

我正在尝试为一个项目创建一个标准的虚拟环境。我有一个包含所有必需模块的工作虚拟环境。我有一个批处理文件来安装所需的东西。

批处理代码的一部分如下所示:

pip install --no-index "altgraph-0.17-py2.py3-none-any.whl"
pip install --no-index "pefile-2017.8.1.zip"
pip install --no-index "pywin32_ctypes-0.2.0-py2.py3-none-any.whl"

pip install --no-index "setuptools-40.8.0-py2.py3-none-any.whl "
pip install --no-index "PyInstaller-3.6.tar.gz"

当我运行这个时,我收到以下错误

(py368) C:\Users\kgreen\Source\Repos\MapTools\py368_modules>pip install --no-index "PyInstaller-3.6.tar.gz"
Processing c:\users\kgreen\source\repos\maptools\py368_modules\pyinstaller-3.6.tar.gz
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\kgreen\source\repos\maptools\py368\scripts\python.exe' 'c:\users\kgreen\source\repos\maptools\py368\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\kgreen\AppData\Local\Temp\pip-build-env-fcj_djos\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (2 lines):
  ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0
  ERROR: No matching distribution found for setuptools>=40.8.0
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\kgreen\source\repos\maptools\py368\scripts\python.exe' 'c:\users\kgreen\source\repos\maptools\py368\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\kgreen\AppData\Local\Temp\pip-build-env-fcj_djos\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

但这正是我安装的 setuptools 版本!我之前曾尝试过 setuptools-41.4.0,但当它不起作用时,我尝试返回到他们错误消息提到的确切版本。

注意:当我稍后尝试安装西班牙凉菜汤时,我遇到了同样的错误......无法识别 setuptools>=40.8.0 已经安装。

注意:当我做 pip list 时,我看到确实安装了正确版本的 setuptools。

(编辑)注意:我忘了提到这也必须适用于未连接到 Internet 的系统,因此解决方案必须指向轮文件或 zip,但不能直接指向 PyPi。

我还尝试在事后手动键入安装,认为可能需要延迟才能完成对先前安装的 setuptools 的一些处理。 (也许很傻,但我很绝望。) 为什么看不到那个版本?我该如何解决这个问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)