python安装方法mac,找不到在Mac OS X上安装python-dev的方法

在尝试为Django安装psycopg2时遇到了错误,'Python.h' 和 'structmember.h' 文件未找到。经过调查,问题并非缺少python-dev,而是Homebrew Python目录中删除了头文件。通过卸载并重新安装Python解决了问题。
摘要由CSDN通过智能技术生成

I'm trying to install psycopg2 for use with Django. I'm using a virtualenv and when I try to install psycopg2 I get an error which says:

In file included from psycopg/psycopgmodule.c:27:

./psycopg/psycopg.h:30:10: error: 'Python.h' file not found with include; use "quotes" instead

#include

^~~~~~~~~~

"Python.h"

In file included from psycopg/psycopgmodule.c:27:

In file included from ./psycopg/psycopg.h:30:

psycopg/Python.h:29:10: fatal error: 'structmember.h' file not found

#include

^

2 errors generated.

error: command 'clang' failed with exit status 1

I found a few threads online that seemed to suggest that the solution to this problem is to install python-dev. Unfortunately, I've only found it available for apt-get and yum. It's not

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值