[英]How to install python developer package?
I am trying to get mod_wsgi 3.3
to work.我正在尝试让
mod_wsgi 3.3
工作。 When I run make
it is telling me that I am missing the Python developer package.当我运行
make
时,它告诉我我缺少 Python 开发人员 package。 How do I get and install the Python developer package?如何获取和安装 Python 开发者 package?
The error I get is as follows:我得到的错误如下:
mod_wsgi.c:135:20: error: Python.h: No such file or directory
mod_wsgi.c:138:2: error: #error Sorry, Python developer package does not appear to be installed.
mod_wsgi.c:142:2: error: #error Sorry, mod_wsgi requires at least Python 2.3.0 for Python 2.X.
mod_wsgi.c:150:2: error: #error Sorry, mod_wsgi requires that Python supporting thread.
mod_wsgi.c:153:21: error: compile.h: No such file or directory
mod_wsgi.c:154:18: error: node.h: No such file or directory
mod_wsgi.c:155:20: error: osdefs.h: No such file or directory
System (Amazon EC2 instance)系统(Amazon EC2 实例)
yum install python-devel
will work. yum install python-devel
将工作。
If yum
doesn't work then use如果
yum
不起作用,请使用
apt-get install python-dev
If you use yum search you can find the python dev package for your version of python.如果您使用 yum 搜索,您可以为您的 python 版本找到 python dev package。
For me I was using python 3.5.对我来说,我使用的是 python 3.5。 I ran the following
我跑了以下
yum search python | grep devel
Which returned the following哪个返回以下
I was then able to install the correct package for my version of python with the following cmd.然后,我可以使用以下 cmd 为我的 python 版本安装正确的 package。
sudo yum install python35u-devel.x86_64
This works on centos for ubuntu or debian you would need to use apt-get这适用于 centos 的 ubuntu 或 debian 你需要使用 apt-get
For me none of the packages mentioned above did help.对我来说,上面提到的软件包都没有帮助。
I finally managed to install lxml
after running:运行后我终于设法安装了
lxml
:
sudo apt-get install python3.5-dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.