python2.5 easy_install-2.5 pycurl issue

Issues related to software problems.
Post Reply
agosdragos
Posts: 2
Joined: 2009/04/14 11:30:07

python2.5 easy_install-2.5 pycurl issue

Post by agosdragos » 2009/04/14 14:21:16

Hi, I'm trying to install pycurl module in python2.5 with easy_install-2.5 but I can't get it to execute.

svr ~: sudo easy_install-2.5 pycurl
Password:
sudo: unable to execute /usr/local/bin/easy_install-2.5: Success

I have successfully imported other modules like flup and cherrypy into python2.5.
-----
Here is the python2.5 output:

svr ~: python2.5
Python 2.5.2 (r252:60911, Apr 13 2009, 19:12:58)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

svr ~: python2.5
Python 2.5.2 (r252:60911, Apr 13 2009, 19:12:58)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import flup
>>> import cherrypy
>>>

----
When I type sudo -i and login as root and try to execute easy_install-2.5 I get this

svr ~: easy_install-2.5
-bash: easy_install-2.5: command not found
svr ~: which easy_install-2.5
/usr/bin/which: no easy_install-2.5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/root/bin)
svr ~:
-----
Interestingly I had issues with python2.4 as well:

svr ~: sudo easy_install-2.4 pycurl
Searching for pycurl
Reading http://cheeseshop.python.org/pypi/pycurl/
Reading http://pycurl.sourceforge.net/
Reading http://pycurl.sourceforge.net/download/
Reading http://cheeseshop.python.org/pypi/pycurl/7.18.1
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-5C05pS/pycurl-7.19.0/egg-dist-tmp-27OxKc
sh: curl-config: command not found
Traceback (most recent call last):

After fighting with $PATH and permissions I was able to execute as root:

svr ~: easy_install-2.4 pycurl
Searching for pycurl
Reading http://cheeseshop.python.org/pypi/pycurl/
Reading http://pycurl.sourceforge.net/
Reading http://pycurl.sourceforge.net/download/
Reading http://cheeseshop.python.org/pypi/pycurl/7.18.1
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-5INJZq/pycurl-7.19.0/egg-dist-tmp-zWcqsa
Using curl-config (libcurl 7.19.0)
zip_safe flag not set; analyzing archive contents...
Adding pycurl 7.19.0 to easy-install.pth file

Installed /usr/lib/python2.4/site-packages/pycurl-7.19.0-py2.4-linux-i686.egg
Processing dependencies for pycurl
Finished processing dependencies for pycurl
svr ~: python2.4
Python 2.4.3 (#1, Jan 21 2009, 01:10:13)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
>>>
==================

But I'm lost on this error message:

When I sudo:

svr ~: sudo easy_install-2.5 pycurl
Password:
sudo: unable to execute /usr/local/bin/easy_install-2.5: Success
svr ~:
-----
As root:

svr ~: easy_install-2.5 pycurl
-bash: easy_install-2.5: command not found
svr ~:

And the strangest thing is when I go to the directory to execute easy_install-2.5:

svr /usr/local/bin: ls
curl curl-config easy_install easy_install-2.5 idle pydoc python python2.5 python2.5-config python-config smtpd.py
svr /usr/local/bin: easy_install-2.5
-bash: easy_install-2.5: command not found
svr /usr/local/bin: ./easy_install-2.5
-bash: ./easy_install-2.5: /home/tgordon/flup-1.0: bad interpreter: Permission denied
svr /usr/local/bin:

svr /usr/local/bin: whoami
root
svr /usr/local/bin: echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/root/bin
svr /usr/local/bin:

I have no idea what this means:

svr /usr/local/bin: ./easy_install-2.5
-bash: ./easy_install-2.5: /home/tgordon/flup-1.0: bad interpreter: Permission denied

But it could be the issue.

Thanks for any help.

agosdragos
Posts: 2
Joined: 2009/04/14 11:30:07

Re: python2.5 easy_install-2.5 pycurl issue ***Problem Solved***

Post by agosdragos » 2009/04/15 04:32:46

Thanks to m-b from the Philadelphia Linux group this issue has been solved. Since the app calls for both versions of python to run (2.4 and 2.5, I don't know why 2.5 is needed) I needed to execute easy_install-2.5 via the python2.5 path:

svr /usr/local/bin: /usr/local/bin/python2.5 easy_install-2.5 pycurl
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-d9VXpr/pycurl-7.19.0/egg-dist-tmp-xYxv8s
Using curl-config (libcurl 7.19.0)
zip_safe flag not set; analyzing archive contents...
Adding pycurl 7.19.0 to easy-install.pth file

Installed /usr/local/lib/python2.5/site-packages/pycurl-7.19.0-py2.5-linux-i686.egg
Processing dependencies for pycurl
Finished processing dependencies for pycurl

--Done.

Post Reply