我正在尝试升级pycairo软件包,但收到以下错误:$ python3 -m pip install -U pycairo Defaulting to user installation because normal site-packages is not writeableCollecting pycairo Using cached pycairo-1.19.1.tar.gz (205 kB)Installing collected packages: pycairo Running setup.py install for pycairo ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ho1du2qw/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ho1du2qw/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-21711no1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/abcde/.local/include/python3.7m/pycairo cwd: /tmp/pip-install-ho1du2qw/pycairo/ Complete output (19 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/cairo copying cairo/__init__.py -> build/lib.linux-x86_64-3.7/cairo copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.7/cairo copying cairo/py.typed -> build/lib.linux-x86_64-3.7/cairo running build_ext building 'cairo._cairo' extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/cairo问题出在哪里?
1 回答
侃侃无极
TA贡献2051条经验 获得超10个赞
File 意味着您必须使用 C/C++ 标头进行安装,因为它必须编译一些 C/C++ 代码。Python.hpython-dev.h
在Linux Mint/Ubuntu/Debian上,它可能是这个命令之一。
apt install python-dev
apt install python3-dev
apt install python3.7-dev
添加回答
举报
0/150
提交
取消