Jump to content


Photo

Need help with pip


  • Please log in to reply
3 replies to this topic

#1 emetib

emetib

    Noob

  • Members
  • Pip
  • 2 posts

Posted 12 March 2011 - 03:16 AM

Need help with pip.

I installed pip on centos 5.4 python2.6

# install pip from source

yum install python-setuptools

cd /software
wget http://pypi.python.o...urce/p/pip/pip-
0.6.3.tar.gz#md5=0602fa9179cfaa98e41565d4a581d98c
tar -xzf pip-0.6.3.tar.gz
cd pip-0.6.3
sudo /usr/bin/python2.6 setup.py install

pip install virtualenv
bash: pip: command not found

pip –version
pip: command not found

So I need help removing pip 0.6.3 and wish to install
pip 0.8.2 and virtualenv to use with django/pinax.

#2 Dungeon-Dave

Dungeon-Dave

    Linux-Noob Frequent Member

  • Moderator
  • PipPipPipPipPipPipPip
  • 972 posts

Posted 12 March 2011 - 07:49 AM

cd /software
sudo /usr/bin/python2.6 setup.py install

Looks like it was installed into the "/software" directory...

pip install virtualenv
bash: pip: command not found

pip –version
pip: command not found

Have you tried:
/software/pip -version

So I need help removing pip 0.6.3 and wish to install
pip 0.8.2 and virtualenv to use with django/pinax.

When you extracted pip, there should have been a README or some other documentation file that came with the package - what does that say?

Also - when it comes to python packages - they're not "installed" as such, they're just a pile of scripts that sit in a directory that are accessible from the command prompt. Downloading and running a python setup on the newer one will "install" that one for you - just delete the directory of the older one.

Most python scripts I use are setup somewhere off /usr/lib/python or /usr/local/, and I link the executable to /usr/local/bin so that it's available when I call it directly from the command line.

Another alternative is to install pip from RPM first:

http://pkgs.org/cent...noarch.rpm.html

The actual RPM package can be found here: http://download.fedo....el5.noarch.rpm

Hope that works!

#3 emetib

emetib

    Noob

  • Members
  • Pip
  • 2 posts

Posted 12 March 2011 - 09:37 PM

cd /software
sudo /usr/bin/python2.6 setup.py install

Looks like it was installed into the "/software" directory...

I use software directory to download and untar.

installed pip using
sudo /usr/bin/python2.6 setup.py install
I have my python2.6 version installed in opt/python2.6.

so cd /opt/python2.6/bin/
ls
directory now has pip in it

cd /opt/python2.6/lib/python2.6/site-packages/
ls
directory now has pip in it



pip –version
pip: command not found

Have you tried:

/software/pip -version

pip -version does not work from any directory
it seams it did not install correctly

So I need help removing pip 0.6.3 and wish to install
pip 0.8.2 and virtualenv to use with django/pinax.

Downloading and running a python setup on the newer one will "install" that one for you - just delete the directory of the older one.

Another alternative is to install pip from RPM first:

http://pkgs.org/cent...noarch.rpm.html

The actual RPM package can be found here: http://download.fedo....el5.noarch.rpm

Hope that works!


When I figure this out how do I link the executable so that it's available when I call it directly from the command line.

#4 Dungeon-Dave

Dungeon-Dave

    Linux-Noob Frequent Member

  • Moderator
  • PipPipPipPipPipPipPip
  • 972 posts

Posted 17 March 2011 - 08:15 PM

cd /opt/python2.6/lib/python2.6/site-packages/
ls
directory now has pip in it

Does "/opt/python2.6/lib/python2.6/site-packages/pip -version" work?

If it does, you could consider adding /opt/python2.6/lib/python2.6/site-packages/ to your PATH variable.

When I figure this out how do I link the executable so that it's available when I call it directly from the command line.

Either the binary needs to be in a directory specified by your PATH variable, or you need to amend your PATH variable to point to that directory location. Calling it by name from the command line should then work.

If you can run it using a full (absolute) path first, it's a simple matter of linking back to a binaries directory (/usr/local/bin or so).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users