Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to undo a Python setuptools --prefix path blunder

Reply
Thread Tools

How to undo a Python setuptools --prefix path blunder

 
 
Kev
Guest
Posts: n/a
 
      11-06-2011
When I installed Python's setuptools I absent mindedly tacked on a --
prefix path I had been using on another machine:

sh setuptools-0.6c11-py2.7.egg --prefix=/opt/python2.7.2

Now after this blunder when I try to install pip I get the following
error:

[root@kkdev src]# easy_install pip
Searching for pip
Best match: pip 1.0.2
Processing pip-1.0.2-py2.7.egg
pip 1.0.2 is already the active version in easy-install.pth
Installing pip script to /usr/bin
error: /usr/bin/pip: No such file or directory

What's happening is that a symbolic link is being created that points
to the folder I specified in the --prefix path which is obviously
wrong:

[root@kkdev src]# ls -al /usr/bin/pip
lrwxrwxrwx 1 root root 24 Nov 5 17:01 /usr/bin/pip -> /opt/
python2.7.2/bin/pip

I deleted this link and then re-ran the setuptools installer and
specified the correct prefix (my Python install lives in /usr/lib/
python2.7):

sh setuptools-0.6c11-py2.7.egg --prefix=/usr

I then re-ran easy_install pip and it looked like I'd fixed my finger
trouble. However when I went to install virtualenv I encountered the
same problem:

[root@kkdev src]# pip install virtualenv

[uninteresting installer output snipped]

Installing virtualenv script to /usr/bin

error: /usr/bin/virtualenv: No such file or directory

Again the wrong path is being used to create the symbolic link to
where virtualenv is installed:

[root@kkdev src]# ls -al /usr/bin/virtualenv
lrwxrwxrwx 1 root root 31 Nov 5 17:01 /usr/bin/virtualenv -> /opt/
python2.7.2/bin/virtualenv

(I'm running Fedora 15 32bit which has Python 2.7.1 installed out of
the box)

How do I fix/repair this permanently?

Thanks
Kevin



 
Reply With Quote
 
 
 
 
Matej Cepl
Guest
Posts: n/a
 
      11-07-2011
Dne 6.11.2011 14:18, Kev napsal(a):
> Again the wrong path is being used to create the symbolic link to
> where virtualenv is installed:


http://packages.python.org/distribut...r-installation
for list of additional configuration files which might go wrong (namely
*.pth and distutils.cfg).

Is that it?

Matěj
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Override path to python during installation (setuptools) Yegor Yefremov Python 0 05-07-2012 06:54 AM
Microsoft apologizes for update blunder Greg House NZ Computing 2 10-31-2007 05:08 AM
exposure compensation blunder dmedhora@gmail.com Digital Photography 8 04-07-2006 08:48 PM
My backup strategy blunder Fatfreek Computer Support 1 09-14-2003 09:23 PM



Advertisments