Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
471 views
in Technique[技术] by (71.8m points)

python imaging library - 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.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...