SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
时间: 2023-07-02 09:14:40 浏览: 242
这是一个关于安装 numpy 包时出现的错误。错误提示说你需要安装 python-dev 或 python-devel ,这是因为 numpy 包需要编译一些 C 代码才能安装成功。你可以尝试使用以下命令安装 python-dev 或 python-devel:
对于 Debian 或 Ubuntu 系统:
```
sudo apt-get install python-dev
```
对于 CentOS 或 RHEL 系统:
```
sudo yum install python-devel
```
安装完成后,再重新安装 numpy 包即可。如果还有其他问题,请告诉我。
阅读全文