python - 如何安装python开发者包?

标签 python linux amazon-ec2 mod-wsgi

我正在尝试让 mod_wsgi 3.3 工作。当我运行 make 时,它告诉我我缺少 Python 开发人员包。如何获取和安装 Python 开发者包?

我得到的错误如下:

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

系统(Amazon EC2 实例)

  • Apache 2.2.16 (Unix)
  • Amazon Linux(Red Hat 4.4.4-13) AMI 测试版 2011.02
  • Python 2.6.6

最佳答案

yum install python-devel 会起作用。

如果 yum 不起作用则使用

apt-get install python-dev

关于python - 如何安装python开发者包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6230444/

相关文章:

python - 在 Python 中更快地遍历列表

python - 如何解决 dist.init_process_group 挂起(或死锁)?

python - Django - 如何只允许新帖子的所有者编辑或删除帖子?

php - exec 函数中的 Sudo

Python ast(抽象语法树): get back source string of subnode

linux - ElasticBeanstalk - 将 ec2-user 添加到另一个组

linux - 限制大小的文件夹

linux - 默认用户 ubuntu ec2 被意外删除

java - 为使用 Selenium 网络驱动程序的网络应用程序选择云计算服务

emacs - ESS和EC2错误“R进程已终止”