在安裝pillow過程中遇到的問題
_imaging.c:76:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command ‘i686-linux-gnu-gcc’ failed with exit status 1
Command “/home/ubuntu/django_1/VENV_1/bin/python2.7 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-Ug0RLp/Pillow/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install –record /tmp/pip-93Wj3K-record/install-record.txt –single-version-externally-managed –compile –install-headers /home/ubuntu/django_1/VENV_1/include/site/python2.7/Pillow” failed with error code 1 in /tmp/pip-build-Ug0RLp/Pillow
上面是錯誤 ;
解決方案:
安裝python-dev
sudo apt-get install python-dev