繁体   English   中英

安装 Pillow Raspbian Python 3.5 时遇到问题(缺少 JPEG 依赖项)

[英]Trouble Installing Pillow Raspbian Python 3.5 (Missing JPEG Dependency)

正如您在标题中看到的,我在 Raspbian Jessie(树莓派 3)上安装 Pillow for Python 3 时遇到了问题。 错误说:

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

加上整整 300 行其他东西,如果 pastebin 有帮助, http://pastebin.com/b3UUskB4

我试过确保所有必需的依赖项http://pillow.readthedocs.io/en/3.0.x/installation.html#old-versions安装如下:

apt-cache search <dependency name>
sudo apt-get install <name found from previous command>

特别是对于 libjpeg 和 openjpeg(我认为是问题的两个),我做了:

sudo apt-get install libjpeg8
sudo apt-get install libopenjpeg5

来这里之前我也搜索过这个问题。 我发现的一个线程https://askubuntu.com/questions/156484/how-do-i-install-python-imaging-library-pil用于 pil 而不是枕头,它说枕头可能看错了这些依赖项的位置,在这种情况下,我应该执行以下操作:

sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so.6 /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so.62 /usr/lib/

但是由于这些确切的命令不适用于我的特定情况,因此我尝试修复它们,而是执行了以下操作:

sudo ln -s /usr/lib/arm-linux-gnueabihf/libjpeg.so.62 /usr/lib

所以我真的不确定我在这里做错了什么,但任何指导将不胜感激,在此先感谢您的帮助!

我将在这里建议,由于 Jessie 是 Debian 而 Ubuntu 是 Debian 的一种风格,我们可以查看一些 Ubuntu 帖子以寻求帮助。 我在微型计算机上使用 Python 和 Debian 有一些经验,实际上我发现apt-get业务与桌面上的 Ubuntu 非常相似。

也就是说, 这篇文章可能会提供解决方案——尝试build-dep而不是install 特别是,请参阅 roadmr 于 2013 年 7 月 26 日的回答以及他提供的链接。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM