简体   繁体   中英

pycurl module not available after installation on Snow Leopard

I'm running Python 2.6.4 on Mac Snow Leopard. I installed pycurl using:

sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.16.2.1

The installation completes with no issues and says pycurl is installed in subsequent installation attempts. However, when I try to "import pycurl" in a script, I get a message that pycurl isn't found. I'm not sure what else to do to fix this.

I would suspect you have 2 versions of python on your system. How about removing easy install and reinstalling it.

Remove the current easy install script by typing which easy_install and then rm [easy install full path] .

To install easy install

wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py

Then, try your command again:

sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.16.2.1

我猜你有2个不同版本的python,可以通过运行命令来找出which python

如果您已使用python.org OS X安装程序安装了Python 2.6.4,则需要从10.6 Xcode mpkg安装可选的10.4u SDK ,以安装任何包含C扩展模块的python软件包。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM