gpt4 book ai didi

python 库依赖错误 :pkg_resources. DistributionNotFound: pycups

转载 作者:太空宇宙 更新时间:2023-11-04 10:39:43 25 4
gpt4 key购买 nike

我想安装这个 repo https://github.com/armooo/cloudprint在我的树莓派上。说明在这里 https://baxeico.wordpress.com/2014/06/03/raspberry-pi-google-cloud-print/

我有

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

然后我得到了这里显示的错误信息:

pi@raspberrypi ~ $ 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 install 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

最佳答案

根据一般经验,如果您看到如下错误:

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

这通常意味着您缺少存储库中的 something-dev 包。

在这种情况下,apt-get install python-devpycups(一个 Python 包)的依赖项

一旦你得到 pycups cloudprint 就应该可以工作了。

关于python 库依赖错误 :pkg_resources. DistributionNotFound: pycups,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35677464/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com