“--no-install”后无法恢复“pip install”

时间:2014-03-06 18:18:23

标签: python python-imaging-library pillow

我正在尝试在Debian 7服务器上安装支持JPEG文件的Pillow(Python Imaging Library的分支,又名PIL)。我最初使用以下命令将Pillow v2.3.0安装到我的虚拟环境中:

pip install Pillow

但是我从输出中看到Pillow默认不支持JPEG。现在去年年底,我已将Pillow安装到我的Mac笔记本电脑上,但我必须做以下事情:

pip uninstall Pillow
pip install --no-install Pillow

然后我必须将此行添加到build / Pillow / setup.py文件中:

JPEG_ROOT = 'path/to/my/libjpeg/library'

然后我重新运行了“pip install Pillow”,Pillow得到了JPEG支持。

但是现在当我在Debian上“pip install Pillow”时,我收到了这个错误:

DEPRECATION:  --no-install, --no-download, ... are deprecated.  See
https://github.com/pypa/pip/issues/906.

一旦我更改了JPEG_ROOT并再次运行“pip install Pillow”,我就会收到此错误:

pip can't proceed with requirement 'Pillow' due to a pre-existing build directory.  location: /home/myapp/venv/myapp/build/Pillow
This is likely due to a previous installation that failed.
etc., etc.

当我查看该链接时,我看到“--no-download”选项确实已被弃用。该页面提到了新的“解压缩”和“下载”选项。

有没有其他方法可以重新启动此pip安装?

感谢。

更新:

我运行了“pip --help”,但没有看到问题页面中描述的“下载”或“解压缩”选项。我还尝试使用每个选项运行pip,以防帮助文件没有更新但无济于事。我也去了构建目录并运行“python setup.py”,但这不起作用,我甚至不确定它应该是什么。我也想也许我可以做通常的“config / make / sudo make install”过程,但是没有配置脚本可以运行。

在阅读question后,我也尝试了以下内容:

mkdir /home/me/pillow
pip install --download="/home/me/pillow" Pillow
cd  pillow
(I unzipped the Pillow file and changed to the Pillow directory)
(Then I edited the setup.py file)
pip install --no-index --find-links="/home/me/pillow" Pillow

然后安装枕头但它仍然不包括JPEG支持。我在这里错过了一步吗?它的行为就像它没有看到我改变了JPEG_ROOT。

请帮忙!感谢。

1 个答案:

答案 0 :(得分:0)

查看上一次尝试,您可能希望将文件打包回ZIP并删除您已创建的目录。我认为应该拿起那个文件然后正常安装。