python “decoder JPEG not available PIL”
一个在vps 上使用PIL 出现错误的解决方法
On Ubuntu:
# install libjpeg-dev with apt
sudo apt-get install libjpeg-dev
# reinstall PIL
pip install -I PIL
If that doesn't work, try one of the below, depending on whether you are on 64bit or 32bit Ubuntu (thanks Charles Offenbacher for pointing out this differs for 32bit).
For Ubuntu x64:
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
Or for Ubuntu 32bit:
sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib/
sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so.6 /usr/lib/
sudo ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib/
Then reinstall PIL:
pip install -I PIL
0
See Also
- Tushare:免费、开源的python财经数据接口包
- 推荐个python的爬虫教程?
- Google对python之父……
- Python 语言 2022 峰会:没有 GIL 的 Python
- 2018年要学python的10个原因
Nearby
- 上一篇 › Nginx 域名转向从www 到裸域名
- 下一篇 › [referer-parser]一个来路分析工具