Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install PIL doesn't install into virtualenv

How do I install 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. 
like image 985
Droid Avatar asked Jan 20 '14 19:01

Droid


People also ask

Does pip install in all environments?

As long as your virtual environment is activated pip will install packages into that specific environment and you'll be able to import and use packages in your Python application.

What is pip install Virtualenv?

pip is a tool for installing packages from the Python Package Index. virtualenv is a tool for creating isolated Python environments containing their own copy of python , pip , and their own place to keep libraries installed from PyPI.


1 Answers

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

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).

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

like image 166
JCotton Avatar answered Sep 23 '22 10:09

JCotton