在linux上安装pip时出错

2024-10-04 03:22:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我在一个Raspberry Pi上运行raspbianlinux,并且安装了pythonpython3和{}。当我运行sudo pip install pillow时,我得到一个非常大的代码输出。第一个错误是Failed building wheel for pillow,之后是说它没有建立枕头,将安装枕头。在

在代码的最后,我有一个红色的错误:

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Yhx8TM/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.rea                                                                          
d().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-yjhZ83-record/install-record.txt --single-version-externally-m                                                                          
anaged --compile" failed with error code 1 in /tmp/pip-build-Yhx8TM/pillow/

我一直在遵循https://pillow.readthedocs.io/en/latest/installation.html的安装说明,但没有找到解决方案。在

我还没有在网上发现类似的错误。在

更新:我尝试过安装cython,更新gcc和g++。我也试过运行python -m pip install pillow。我尝试过通过pip安装django,但我得到了一个错误:

^{pr2}$

更新:我已经为python3安装了pip3,我遇到了与前面相同的问题。在


Tags: installpip代码build错误codeopenrecord