PIL cannot be installed by virtualenv with pyenv

** The following information is out of date and cannot be executed at this time. ** **

Please see here for details. Pip \ | Open Data and Programming

After all, it seems that PIL can no longer be entered with pip.

It seems that from some version of pip, --allow-external and --allow-unverified are now deprecated.

You can use the pillow quietly, right?


pyenvI have set the environment withpyenv local hogehogeAnd thenpyenv activateIn the project I'm doingpip install pilIs moss.

Furthermore, it was a two-stage mechanism, so a memo

Conclusion

Details

The first --allow-external matter

$ pip install PIL

It will be moss

Downloading/unpacking PIL
  Could not find any downloads that satisfy the requirement PIL
  Some insecure and unverifiable files were ignored (use --allow-unverified PIL to allow).
Cleaning up...
No distributions at all found for PIL
Storing debug log for failure in /Users/jasper/.pip/pip.log

Google

It was written here http://stackoverflow.com/questions/21242107/pip-install-pil-dont-install-into-virtualenv

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

I felt something different from what I was doing

The second freetype

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

I'm glad I made progress with, but I can't install it yet

building '_imagingft' extension

gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -I/usr/local/include/freetype2 -IlibImaging -I/usr/local/opt/pyenv/versions/inblue/include -I/usr/local/include -I/usr/include -I/usr/local/opt/pyenv/versions/2.6.8/include/python2.6 -c _imagingft.c -o build/temp.macosx-10.4-x86_64-2.6/_imagingft.o

_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found

#include <freetype/fterrors.h>

         ^

1 error generated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/local/opt/pyenv/versions/inblue/bin/python -c "import setuptools, tokenize;__file__='/usr/local/var/lib/pyenv/versions/inblue/build/PIL/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" install --record /var/folders/10/1gcb6yqd4m14g9qr7s0lztg40000gn/T/pip-0bcmkN-record/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/opt/pyenv/versions/inblue/include/site/python2.6 failed with error code 1 in /usr/local/var/lib/pyenv/versions/inblue/build/PIL
Storing debug log for failure in /Users/jasper/.pip/pip.log

do not know. Google

This is true, but not. Put in Pillow. http://stackoverflow.com/questions/23996756/pil-installation-error-on-mac-os-maverics-inside-virtual-env

What I want to put in is PIL

Further google

It's like that. http://stackoverflow.com/questions/20325473/error-installing-python-image-library-using-pip-on-mac-os-x-10-9

I just put a symbolic link, and there was no linked file, so I thought I could get it back if I just did it.

ln -s /usr/local/include/freetype2 /usr/local/include/freetype

Yes. Successful installation.

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

2014/11/20 Addendum: The cause was discovered by receiving a comment from @shitsyndrome.

Since 1.5 of pip, the default behavior has changed, and it seems that you need to specify it explicitly if you want to download from an external host (other than pypi.python.org). http://pip.readthedocs.org/en/latest/reference/pip_install.html#externally-hosted-files

Recommended Posts

PIL cannot be installed by virtualenv with pyenv
pyenv doesn't work with tcl-tk installed by homebrew.
Import libraries that cannot be pip installed with PyCharm
When pydub cannot be installed
Options when installing libraries that cannot be piped with pyenv
Use pydoc with Virtualenv / pyenv / venv
I couldn't use tkinter with python installed by pyenv of anyenv
Django cannot be installed in the development environment of pipenv + pyenv
Use Anaconda-Python installed with pyenv from openFrameworks
Items that cannot be imported with sklearn
De-VBA Excel tool! Eliminate VBA tool with Python in environment where Python cannot be installed
Project cannot be created with Python3.5 (Windows) + django1.7.1
When contour map cannot be drawn with APLpy
Python environment settings (virtualenv + pip cannot be done)
Make OpenCV3 available from python3 installed with pyenv
No module named'distutils.util' cannot be used with get-pip.py
Investigation when import cannot be done with python
What to do if pip cannot be installed
Matplotlib etc. cannot be imported in VirtualEnv environment
pyenv + virtualenv + Anaconda
The avi file output by OpenCV cannot be played
Create a virtual environment with Anaconda installed via Pyenv
Use Python installed with pyenv for PL / Python execution environment
[android] When AVD cannot be used with permission denied
Causes when python version cannot be changed using pyenv
Install the latest Python from pyenv installed with homebrew
Use python installed with Pyenv with Sublime REPL of Sublime Text 3
A memorandum (masOS) that import tkinter could not be done with python installed from pyenv