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

时间:2020-01-08 07:02:45

标签: python pip

Could not install packages due to an EnvironmentError: 404 Client Error:

如何解决以上错误?

2 个答案:

答案 0 :(得分:5)

您缺少-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.

答案 1 :(得分:0)

语法为pip install -r requirements.txt

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