pip安装PIL不安装到virtualenv

时间:2022-08-13 00:23:58

How do I install PIL?

如何安装PIL?

>pip install PILDownloading/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 PILCan't uninstall 'PIL'. No files were found to uninstall.

2 个解决方案

#1


144  

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

pip安装PIL -allow-external PIL -allow- unpil。

This is due to changes in the new version of Pip. Run pip --version and I'm willing to bet you are running 1.5. See the changelog here. This new default behavior enhances security. In PIL's case, the file you are installing actually comes from effbot.org (thus --allow-external) and PyPi doesn't have a checksum to guarantee validity (thus --allow-unverified).

这是由于Pip的新版本发生了变化。运行pip -版本,我敢打赌你运行的是1.5。看到这里的更新日志。这种新的默认行为增强了安全性。在PIL案例中,您正在安装的文件实际上来自effbot.org(因此——allow-external),并且PyPi没有校验和来保证有效性(因此——allow- unverify)。

Also, you might consider using the Pillow replacement to PIL.

另外,您也可以考虑使用枕头替代品PIL。

#2


36  

Updated info for those reading in 2016:

2016年读者更新信息:

--allow-external

and

--allow-unverified

were recently deprecated. Installing packages external to PyPi using pip is no longer supported: http://www.python.org/dev/peps/pep-0470/

最近被弃用。不再支持使用pip在PyPi外部安装包:http://www.python.org/dev/peps/pep-0470/

As an alternative, when you really need to install that external package, you can download the source code and run its setup.py. For example, for PIL 1.1.7, download from http://www.pythonware.com/products/pil/, then:

作为替代方案,当您确实需要安装该外部包时,您可以下载源代码并运行它的setup.py。例如,对于PIL 1.1.7,从http://www.pythonware.com/products/pil/下载,然后:

$ tar xvfz Imaging-1.1.7.tar.gz$ cd Imaging-1.1.7$ python setup.py install

(^ from the PIL README)

从公益诉讼的自述(^)

If you only want to install the package to a specific virtualenv, you can just activate your virtualenv first. ** thanks @Caumons

如果您只想将包安装到特定的virtualenv,您可以首先激活virtualenv。* *谢谢@Caumons

Alternatively, substitute the path to your virtualenv for 'python' in the third line, e.g.:

或者,用第三行中的“python”替换到virtualenv的路径,例如:

$ /home/username/virtualenv-name/bin/python setup.py install

#1


144  

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

pip安装PIL -allow-external PIL -allow- unpil。

This is due to changes in the new version of Pip. Run pip --version and I'm willing to bet you are running 1.5. See the changelog here. This new default behavior enhances security. In PIL's case, the file you are installing actually comes from effbot.org (thus --allow-external) and PyPi doesn't have a checksum to guarantee validity (thus --allow-unverified).

这是由于Pip的新版本发生了变化。运行pip -版本,我敢打赌你运行的是1.5。看到这里的更新日志。这种新的默认行为增强了安全性。在PIL案例中,您正在安装的文件实际上来自effbot.org(因此——allow-external),并且PyPi没有校验和来保证有效性(因此——allow- unverify)。

Also, you might consider using the Pillow replacement to PIL.

另外,您也可以考虑使用枕头替代品PIL。

#2


36  

Updated info for those reading in 2016:

2016年读者更新信息:

--allow-external

and

--allow-unverified

were recently deprecated. Installing packages external to PyPi using pip is no longer supported: http://www.python.org/dev/peps/pep-0470/

最近被弃用。不再支持使用pip在PyPi外部安装包:http://www.python.org/dev/peps/pep-0470/

As an alternative, when you really need to install that external package, you can download the source code and run its setup.py. For example, for PIL 1.1.7, download from http://www.pythonware.com/products/pil/, then:

作为替代方案,当您确实需要安装该外部包时,您可以下载源代码并运行它的setup.py。例如,对于PIL 1.1.7,从http://www.pythonware.com/products/pil/下载,然后:

$ tar xvfz Imaging-1.1.7.tar.gz$ cd Imaging-1.1.7$ python setup.py install

(^ from the PIL README)

从公益诉讼的自述(^)

If you only want to install the package to a specific virtualenv, you can just activate your virtualenv first. ** thanks @Caumons

如果您只想将包安装到特定的virtualenv,您可以首先激活virtualenv。* *谢谢@Caumons

Alternatively, substitute the path to your virtualenv for 'python' in the third line, e.g.:

或者,用第三行中的“python”替换到virtualenv的路径,例如:

$ /home/username/virtualenv-name/bin/python setup.py install