首页 > 解决方案 > 由于 EnvironmentError 无法安装软件包:404 客户端错误

问题描述

由于 EnvironmentError 无法安装软件包:404 客户端错误:

如何解决上述错误?

标签: pythonpip

解决方案


您缺少 -r 命令标志,因此请再次使用

 pip install -r requirements.txt

和以前一样,pip只是尝试requirements.txt从远程存储中获取,期望它是一个包名。

pip help install

用法:

pip install [options] <requirement specifier> [package-index-options]...
pip install [options] -r <requirements file> [package-index-options]...

...

pip also supports installing from "requirements files", which 
provide an easy way to specify a whole environment to be installed.

安装选项:

-r, --requirement <file>    Install from the given requirements file. 
                            This option can be used multiple times.

推荐阅读