1. No module named 'PIL’錯誤的解決方法:
pip3 install Pillow
2.pillow裝包失敗
Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-mn8o298t/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-pwelxv4x-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-mn8o298t/pillow/
2.1執行下面的命令,下面的包按需要安裝,一般是缺少libssl-dev
我就是只安裝了libssl-dev這個就可以了:
sudo apt-get install build-essential libssl-dev libffi-dev python-dev python3-dev
2.2原因pip版本過低
python -m pip install --upgrade pip #升級pip包