Konrad
Konrad

Reputation: 640

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?

Upvotes: 0

Views: 1619

Answers (2)

pr3
pr3

Reputation: 99

I suggest that, if possible, you avoid installing packages directly into your system. Try to use them based on your projects, using tools such as virtualenv. This way it avoids conflicts, and you can also choose specific versions if needed.

Upvotes: 3

OneCricketeer
OneCricketeer

Reputation: 191743

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

Upvotes: 1

Related Questions