python library dependency error :pkg_resources.DistributionNotFound: pycups

admin

Administrator
Staff member
I want to install this repo <a href="https://github.com/armooo/cloudprint" rel="nofollow">https://github.com/armooo/cloudprint</a> on my raspberry pi.
The instruction is here
<a href="https://baxeico.wordpress.com/2014/06/03/raspberry-pi-google-cloud-print/" rel="nofollow">https://baxeico.wordpress.com/2014/06/03/raspberry-pi-google-cloud-print/</a>

I have

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

Then i got the error message shown here:

<blockquote>
[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(<strong>requires</strong>) 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
</blockquote>

I tried to fix this by:

Code:
sudo apt-get install libcups2-dev

But nothing seems to work. Any help will be appreciated!

I have tried pip install pycups and I have an error message like this:

<blockquote>
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
</blockquote>