我正在尝试安装pip包PIL。然而,安装失败并抛出以下错误。
Could not find a version that satisfies the requirement pil (from xhtml2pdf==0.0.4->-r virtualenv-reqs.txt (line 16)) (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pil to allow).
No matching distribution found for pil (from xhtml2pdf==0.0.4->-r virtualenv-reqs.txt (line 16))
当我使用旧版本的pip时,安装是有效的。但是使用当前版本的pip7.1.2
时,我无法下载软件包。我正在使用以下命令来安装pip软件包。
pip install --timeout=1000 -i http://pypi.ksjc.sh.colo/simple --trusted-host pypi.ksjc.sh.colo -r virtualenv-reqs.txt
这个问题出在哪里呢?我原以为是SSL问题,所以加了--trusted-host
标志。有没有办法使用--allow-external
标志与virtualenv-reqs
文件一起使用。
Pillow
吗?在pip中安装PIL
有点复杂。Pillow
是一个可替换的解决方案。 - Rod Xavierpillow
,但是我正在安装的另一个包xhtml2pdf
需要pil
。 - user3831214--allow-external pil
(不确定是否与virtualenv-reqs
冲突) - Alexanderrequirements.txt
中提到了 pillow,而不是 PIL。因此,PIL 实际上并不是 xhtml2pdf 的要求。 - Michiel Overtoomvirtualenv-reqs
中使用它? - user3831214