[英]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.