相关疑难解决方法(0)

找不到满足要求<package>的版本

我正在使用以下requirements.txt文件在Ubuntu 12.04中安装几个Python包:

numpy>=1.8.2,<2.0.0
matplotlib>=1.3.1,<2.0.0
scipy>=0.14.0,<1.0.0
astroML>=0.2,<1.0
scikit-learn>=0.14.1,<1.0.0
rpy2>=2.4.3,<3.0.0
Run Code Online (Sandbox Code Playgroud)

和这两个命令:

$ pip install --download=/tmp -r requirements.txt
$ pip install --user --no-index --find-links=/tmp -r requirements.txt
Run Code Online (Sandbox Code Playgroud)

(第一个下载包,第二个安装它们).

该过程经常因错误而停止:

  Could not find a version that satisfies the requirement <package> (from matplotlib<2.0.0,>=1.3.1->-r requirements.txt (line 2)) (from versions: )
No matching distribution found for <package> (from matplotlib<2.0.0,>=1.3.1->-r requirements.txt (line 2))
Run Code Online (Sandbox Code Playgroud)

我手动修复:

pip install --user <package>
Run Code Online (Sandbox Code Playgroud)

然后pip install再次运行第二个命令.

但是,这仅适用于特定的包.当我pip install再次运行第二个命令时,进程停止现在抱怨另一个必需的包,我需要再次重复该过程,即:手动安装新的所需包(使用上面的命令),然后运行第二个pip install命令.

到目前为止,我不得不手动安装six,pytz …

python pip requirements.txt

113
推荐指数
7
解决办法
55万
查看次数

标签 统计

pip ×1

python ×1

requirements.txt ×1