我希望为一个项目创建一个标准的虚拟环境。我已经有了一个包含所有必需模块的工作虚拟环境。我有一个批处理文件来安装所需的内容。
批处理代码的一部分如下:
当我运行这个程序时,出现了以下错误:
但这正是我安装的setuptools版本!我之前尝试过setuptools-41.4.0,当它无法工作时,我尝试回到错误消息提到的确切版本。
注意:当我尝试安装gazpacho时,我会收到相同的错误...无法识别已经安装了setuptools>=40.8.0。
注意:当我执行pip list时,我看到确实已经安装了正确版本的setuptools。
(编辑)注意:我忘了提到这也必须适用于未连接到互联网的系统,因此解决方案必须指向wheel文件或zip文件,而不是直接指向PyPi。
我还尝试手动输入安装程序,想着可能需要延迟完成对先前安装setuptools的处理。 (也许很傻,但我绝望了。) 为什么它看不到那个版本?我该如何解决这个问题?
批处理代码的一部分如下:
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,当它无法工作时,我尝试回到错误消息提到的确切版本。
注意:当我尝试安装gazpacho时,我会收到相同的错误...无法识别已经安装了setuptools>=40.8.0。
注意:当我执行pip list时,我看到确实已经安装了正确版本的setuptools。
(编辑)注意:我忘了提到这也必须适用于未连接到互联网的系统,因此解决方案必须指向wheel文件或zip文件,而不是直接指向PyPi。
我还尝试手动输入安装程序,想着可能需要延迟完成对先前安装setuptools的处理。 (也许很傻,但我绝望了。) 为什么它看不到那个版本?我该如何解决这个问题?