0

I'm having a bit of a hard time installing PIP on a debian linux machine. This is the code I am using in a shell script:

# Install setuptools
python -c 'import setuptools' > /dev/null 2>&1
if [[ $? != 0 ]] ; then
    wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python
    if [[ $? != 0 ]] ; then
        echo "Unable to install setuptools" >> /dev/stderr
#       exit 1
    fi
fi

# Install PIP
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py

# Install packages
pip install supervisor --pre
pip install uwsgi 
pip install virtualenv

However in my log I get the following messages showing that PIP didnt install correctly:

/root/StackScript: line 42: pip: command not found
/root/StackScript: line 43: pip: command not found
/root/StackScript: line 44: pip: command not found

Could anyone help me understand where I have gone wrong please?

Jimmy
  • 269
  • 4
  • 7
  • 23
  • Have you looked at this? http://stackoverflow.com/questions/4324558/whats-the-proper-way-to-install-pip-virtualenv-and-distribute-for-python?rq=1 – Giacomo1968 Nov 23 '13 at 18:59

1 Answers1

1

Just install package python-pip from repository:

apt-get install python-pip

If you really need most recent version, then to use it from command line you should add it's executable directory to $PATH

Selivanov Pavel
  • 2,206
  • 3
  • 26
  • 48
  • The trouble is with this is it will install an outdated version of PIP which had security issues. – Jimmy Nov 23 '13 at 18:34