在ActivePython-2.6中安装pyCurl吗? [英] Install pyCurl in ActivePython-2.6?

查看:113
本文介绍了在ActivePython-2.6中安装pyCurl吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去使用过pyCurl,并且可以在我的系统默认python安装中使用它.但是,我有一个项目要求python具有更高的可移植性,并且我正在使用ActivePython-2.6.

I have worked with pyCurl in the past and have it working with my system default python install. However, I have a project that requires python to be more portable and I am using ActivePython-2.6.

到目前为止,我安装任何其他模块都没有问题,但是安装pyCurl时出现错误. 错误:

I have had no problems installing any other modules so far, but am getting errors installing pyCurl. The error:

Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Reading http://pycurl.sourceforge.net/
Reading http://pycurl.sourceforge.net/download/
Best match: pycurl 7.19.0
Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
Processing pycurl-7.19.0.tar.gz
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tfVLW6/pycurl-7.19.0/egg-dist-tmp-p1WjAy
sh: curl-config: not found
Traceback (most recent call last):
  File "/opt/ActivePython-2.6/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1671, in main
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1659, in with_ei_usage
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1675, in <lambda>
  File "/opt/ActivePython-2.6/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/ActivePython-2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/opt/ActivePython-2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 211, in run
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 446, in easy_install
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 476, in install_item
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 655, in install_eggs
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 930, in build_and_install
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 919, in run_setup
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 27, in run_setup
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 63, in run
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py", line 29, in <lambda>
  File "setup.py", line 90, in <module>
Exception: `curl-config' not found -- please install the libcurl development files

我的系统确实安装了libcurl,但是ActivePython似乎找不到它.

My system does have libcurl installed, but ActivePython doesn't seem to find it.

任何想法都会有所帮助!

Any ideas will help!

推荐答案

安装pycurl需要以下依赖项:

Following dependencies are needed for installing pycurl:

apt-cache depends python-pycurl
python-pycurl
 Depends: libc6
Depends: libcurl3-gnutls
Depends: libgcrypt11
Depends: python2.7
Depends: python
Depends: python
Suggests: libcurl4-gnutls-dev
Suggests: python-pycurl-dbg
Conflicts: <python2.3-pycurl>
Conflicts: <python2.3-pycurl:i386>
Conflicts: <python2.4-pycurl>
Conflicts: <python2.4-pycurl:i386>
Replaces: <python2.3-pycurl>
Replaces: <python2.3-pycurl:i386>
Replaces: <python2.4-pycurl>
Replaces: <python2.4-pycurl:i386>
Conflicts: python-pycurl:i386

运行此命令

sudo apt-get install libcurl4-gnutls-dev librtmp-dev

然后您可以使用来安装pycurl

Then you can install pycurl using

pip install pycurl

easy_install pycurl

这篇关于在ActivePython-2.6中安装pyCurl吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆