本文最后更新于:2023年12月5日 下午

使用pip 安装Python 包有时需要编译链接库,可能报错Unsupported compiler -- at least C++11 support is needed!,本文记录解决方案。

问题复现

我是在安装 pyaum包时遇到的错误:

1
2
>>> pip install pyaum
Unsupported compiler -- at least C++11 support is needed!

问题原因

  • 输入gcc --version

    1
    2
    3
    4
    gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    gcc没问题

  • 输入g++ --version

    1
    -bash: g++: command not found

    说明 g++ 没有安装

解决方案

  • 把这 g++ 库装上:
1
2
sudo apt update
sudo apt install g++

1
yum install gcc-c++

参考资料



文章链接:
https://www.zywvvd.com/notes/coding/python/compile-error/compile-error/


“觉得不错的话,给点打赏吧 ୧(๑•̀⌄•́๑)૭”

微信二维码

微信支付

支付宝二维码

支付宝支付

Python 编译错误 Unsupported compiler -- at least C++11 support is needed! 解决方案
https://www.zywvvd.com/notes/coding/python/compile-error/compile-error/
作者
Yiwei Zhang
发布于
2021年11月10日
许可协议