【发布时间】:2022-01-21 00:06:44
【问题描述】:
尝试pip install p5,未能安装依赖PyOpenGL-accelerate。
当我手动尝试pip install PyOpenGl-accelerate 时,它以giant error log 失败,最后出现的错误之一是:
/usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
我已经安装了gcc。我正在使用 Arch linux。
【问题讨论】:
-
Python 3.10是非常新的版本,有些模块可能还没有为这个版本做好准备。最好等几个月再使用3.9或3.8 -
您是否检查过
/usr/bin/gcc是否在控制台中工作。?或者它可能需要安装一些 C/C++ 模块 - 即。python-dev带有用于 Python 代码的 C/C++ 标头。