0

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?

Konrad
  • 630
  • 2
  • 11
  • 27
  • What is the problem? It is already installed. **pycurl 7.19.5.3 is already the active version** – OneCricketeer Feb 11 '16 at 21:51
  • The problem that it is for Python 2.7, not 2.6. Python 2.6 still doesn't see pycurl – Konrad Feb 11 '16 at 21:52
  • How do you know that? Your `python -V` shows version 2.6 – OneCricketeer Feb 11 '16 at 21:54
  • Because I'm trying to import pycurl in the Python interpreter. It says: ImportError: No module named pycurl. Moreover "pycurl-7.19.5.3-py2.7-macosx-10.11-intel.egg" is definitely for 2.7, as you can see – Konrad Feb 11 '16 at 21:55
  • Possible duplicate of [Installing pycurl on mac](http://stackoverflow.com/questions/21521587/installing-pycurl-on-mac) – Vladimir May 10 '17 at 16:58

2 Answers2

3

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.

pr3
  • 99
  • 2
  • 6
1

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
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245