小编esa*_*esa的帖子

致命错误:Python.h 没有这样的文件或目录 - 但 python-dev 已安装

我正在尝试在 Ubuntu 上安装 mod_wsgi。当按照 mod_wsgi 网站上的描述运行“sudo make”命令时,我收到错误:

src/server/wsgi_python.h:24:10: fatal error: Python.h: No such file or directory
Run Code Online (Sandbox Code Playgroud)

mod_wsgi故障排除部分和 SO(1、2、3)上的其他帖子表示要安装正确版本的 python- dev 。这已经根据以下输出完成。Python3 运行 3.6.7 和 apt-get 说 python3-dev 是最新版本的 3.6.7。

$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 

$ sudo apt-get install python3-dev
...
python3-dev is already the newest version (3.6.7-1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Run Code Online (Sandbox Code Playgroud)

所以看起来 Python.h 文件在那里但make找不到它。我看了这篇 SO post ( 4 …

python ubuntu mod-wsgi python-3.6

5
推荐指数
1
解决办法
4448
查看次数

标签 统计

mod-wsgi ×1

python ×1

python-3.6 ×1

ubuntu ×1