Search code examples
pythonmacospython-2.6pycurl

Installing pycurl for Python 2.6 on Mac OS


I have a Mac OS (El Capitan 10.11.3) and I'm trying to install pycurl library for Python 2.6.9. Unfortunately, when I try:

 easy_install pycurl

I have:

 Searching for pycurl
 Best match: pycurl 7.19.5.3
 Processing pycurl-7.19.5.3-py2.7-macosx-10.11-intel.egg
 pycurl 7.19.5.3 is already the active version in easy-install.pth

But it is for Python 2.7 - not 2.6.

Checking current Python version in bash:

 python -V 
 Python 2.6.9

I also tried to install it manually (download .tar and install)

sudo python setup.py install

Output:

Using curl-config (libcurl 7.43.0)
running install
running build
running build_py
running build_ext
running install_lib
running install_data
creating /System/Library/Frameworks/Python.framework/Versions/2.7/share
error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted

The same for:

make PYTHON=python2.6

Do you have any idea how to make it to install pycurl for Python 2.6?


Solution

  • Try

    sudo python2.6 -m easy_install pycurl
    

    Outputs

    Installed /Library/Python/2.6/site-packages/pycurl-7.43.0-py2.6-macosx-10.11-intel.egg