尝试通过Pycharm中的pip安装numpy时出错

时间:2019-09-25 20:55:30

标签: python python-3.x numpy pip installation

尝试使用python3.8解释器通过pipenv安装numpy时遇到问题。我在控制台中收到一个非常大的错误转储。我已经成功地使用python3解释器安装了numpy,所以我不明白为什么我不能使用最新的python版本。错误日志很长,我不得不上传它:

https://textuploader.com/108j9

-谢谢

2 个答案:

答案 0 :(得分:1)

错误是:

  _configtest.c:1:10: fatal error: Python.h: No such file or directory
       #include <Python.h>
                ^~~~~~~~~~

似乎您缺少用于专门构建Python 3.8模块的头文件。试试:

sudo apt-get install python3.8-dev

答案 1 :(得分:0)

对于Python 3.9:

sudo apt-get install python3.9-dev