【问题标题】:Can't install PyOpenGL-accelerate - gcc failed with exit code 1无法安装 PyOpenGL-accelerate - gcc 失败,退出代码为 1
【发布时间】: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.93.8
  • 您是否检查过/usr/bin/gcc 是否在控制台中工作。?或者它可能需要安装一些 C/C++ 模块 - 即。 python-dev 带有用于 Python 代码的 C/C++ 标头。

标签: python gcc pip


【解决方案1】:

好的,所以我请求您卸载 3.10 版本的 python 并安装以前的版本。因为它是一个新的,所以它可能会给你一些错误,并且可能在安装任何库时遇到麻烦。

按照以下步骤操作:
python -m pip uninstall p5
reinstall python 3.8 or lesser version.
python -m pip install p5

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-03
    • 2016-04-18
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多