Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7852589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:27:39+00:00 2026-06-02T19:27:39+00:00

I have Python 2.4 and 2.7 on my Centos server. I would like to

  • 0

I have Python 2.4 and 2.7 on my Centos server.
I would like to use PyCURL under Python 2.7.
I ran yum install pycurl and it appeared to install but when I attempt to import PyCURL it works fine for Python 2.4 but not for 2.7.
Can anyone advise how it is possible to install PyCURL (or any other Python extension for that matter as I can see this being an issue in future) to a specific version of python.
Thanks
C

—— SOULTION (thanks gjallar) ———-

Instead of using YUM I downloaded and installed PyCurl by running the setup.py file using the python version I wanted i.e.

sudo python2.7 setup.py install

This still didn’t work as I was getting an error saying I had the wrong version of libcurl

To ressolve this I downloaded the latest curl version from http://curl.haxx.se/download.html and installed with the instructions here: http://curl.haxx.se/docs/install.html

Sadly, this still didn’t work as when I tried to import pycurl in python I got:

  File "<stdin>", line 1, in <module>
ImportError: libcurl.so.4: cannot open shared object file: No such file or directory

This was in turn ressolved by carrying out the command:

export LD_LIBRARY_PATH=/usr/local/lib

As suggested in the post:
Why can't Python find shared objects that are in directories in sys.path?
(Thanks Vinay)

Now it works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:27:42+00:00Added an answer on June 2, 2026 at 7:27 pm

    One possible route you can take to install a certain application for a specific python version is to install pip using the specific python version and the use pip to install pyCURL.

    In your case this should work by installing pip using python2.7 and then run pip install pycurl:

    Install pip via distribute running the setup.py file with your python2.7 interpreter.

    This requires pycurl to be available in PyPi – otherwise (if the pycurl download contains a setup.py) simple run the setup.py file using the interpreter you want to install it for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running Python 2.6.1 on OSX, will deploy to CentOS. Would like to have a
i have to install mysqldb module of python in my centos server. i have
I would like to have an interface between Python and sqlite. Both are installed
I have Python 2.4 and 2.7 on my Centos server. When I execute python
I recently attempted to upgrade our Python install on a CentOS server from 2.4.3
If I were using python I would probably like to use pip as a
I have a problem of upgrading python from 2.4 to 2.6: I have CentOS
i have an issue i could use some help with, i have python list
If I have SSH access to a shared server (running centOS) and I want
I have a server which is running CentOS with cpanel/whm. Otherwise, it is pretty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.