python-imaging-library - pip install PIL 未安装到 virtualenv 中

标签 python-imaging-library pip

如何安装 PIL?

>pip install PIL

Downloading/unpacking PIL
  Could not find any downloads that satisfy the requirement PIL  
  Some externally hosted files were ignored (use --allow-external PIL to allow). 
Cleaning up... 
No distributions at all found for PIL 
Storing debug log for failure in /root/.pip/pip.log 

>pip uninstall PIL
Can't uninstall 'PIL'. No files were found to uninstall.

最佳答案

pip install PIL --allow-external PIL --allow-unverified PIL

这是由于新版本 Pip 的更改所致。运行pip --version,我敢打赌您正在运行1.5。请参阅变更日志 here 。这种新的默认行为增强了安全性。在 PIL 的情况下,您要安装的文件实际上来自 effbot.org (因此 --allow-external),并且 PyPi 没有校验和来保证有效性(因此--允许未验证)。

此外,您可以考虑使用 Pillow替换为 PIL。

关于python-imaging-library - pip install PIL 未安装到 virtualenv 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21242107/

相关文章:

python - 将/someone/else's/.tar.gz 包转换为 .whl?

python-3.x - Python - 使用 PIL 库使文本倾斜

python-2.7 - 了解 Python 中一行中的多个变量赋值

python - 如何在光学测距仪中测量图像重合度

python - PIL 将透明 PNG 加载为 RGB?

python - 使用 pip 安装 Beautiful Soup

python - 如何通过pip安装包?

python - 快速入门 Flask 应用程序因某种原因失败

python - 使用 PIL(PILLOW) Python 库显示 Dicom 图像

python - 如何在不使用 pip 的情况下在 Heroku 中安装 Python 包?