2016-02-28 91 views
0

我想在我的覆盆子pi上安裝此repo https://github.com/armooo/cloudprint。 指令是在這裏 https://baxeico.wordpress.com/2014/06/03/raspberry-pi-google-cloud-print/python庫依賴項錯誤:pkg_resources.DistributionNotFound:pycups

sudo apt-get install cups 
sudo apt-get install python-daemon python-cups 
sudo dpkg -i cloudprint*.deb 
sudo service cloudprintd login 

後來我這裏顯示的錯誤消息:

[email protected] ~ $ sudo service cloudprintd login Traceback (most recent call last): File "/usr/sbin/cloudprintd", line 5, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2707, in working_set.require(requires) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: pycups

我試圖解決這個問題:

sudo apt-get install libcups2-dev 

但似乎沒有任何工作。任何幫助將不勝感激!

我試圖PIP安裝pycups,我有這樣的錯誤消息:如果你看到這樣的錯誤

building 'cups' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="1.9.73" -I/usr/include/python2.7 -c cupsmodule.c -o build/temp.linux-armv7l-2.7/cupsmodule.o

cupsmodule.c:22:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

+0

你嘗試過'pip install pycups'嗎? – wgwz

+0

@wgwz我做到了。它給了我另一個錯誤。 –

+0

'apt-get install python-dev'然後再次嘗試'pip install pycups' .. – wgwz

回答

1

作爲一個一般的經驗法則:

fatal error: Something.h: No such file or directory 

這通常意味着你缺少來自存儲庫的something-dev包。

在這種情況下apt-get install python-dev是爲pycups(Python包)

的依賴,一旦你pycups CloudPrint中應該工作。