1

I'm trying to install pip on a usb drive F: next to portable python, but it doesn't seem to be working. I'm using Git-bash (msys) as my command line. Please see below for my attempts:

MYPC /f
$ which python
/f/ppython275/App/python    

MYPC /f
$ which pip    

MYPC /f
$ python get-pip.py
Downloading/unpacking pip
  Downloading pip-1.5.tar.gz (898kB): 898kB downloaded
  Running setup.py egg_info for package pip    

    warning: no files found matching 'pip\cacert.pem'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.rst' found under directory 'docs\_build'
    no previously-included directories found matching 'docs\_build\_sources'
Installing collected packages: pip
  Running setup.py install for pip    

    warning: no files found matching 'pip\cacert.pem'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.rst' found under directory 'docs\_build'
    no previously-included directories found matching 'docs\_build\_sources'
    Installing pip-script.py script to f:\ppython275\App\Scripts
    Installing pip.exe script to f:\ppython275\App\Scripts
    Installing pip.exe.manifest script to f:\ppython275\App\Scripts
    Installing pip2.7-script.py script to f:\ppython275\App\Scripts
    Installing pip2.7.exe script to f:\ppython275\App\Scripts
    Installing pip2.7.exe.manifest script to f:\ppython275\App\Scripts
    Installing pip2-script.py script to f:\ppython275\App\Scripts
    Installing pip2.exe script to f:\ppython275\App\Scripts
    Installing pip2.exe.manifest script to f:\ppython275\App\Scripts
Successfully installed pip
Cleaning up...    

MYPC /f
$ which pip

I've restarted the command line. but "which pip" still yields nothing. How can I fix this?

user1592380
  • 34,265
  • 92
  • 284
  • 515

1 Answers1

2

You need to edit your $PATH environment variable to add /f/ppython275/App/Scripts, so the shell looks in that directory for executables.

Edit your ~/.bashrc or ~/.bash_profile and add the following:

export PATH=$PATH:/f/ppython275/App/Scripts

Save, restart your shell, and you should be all set.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • Thanks MattDMo, that worked! As a quick follow up : Is there a way to put the .bashrc on my F drive , so as to make everything truly portable? Thanks again - Bill – user1592380 Jan 09 '14 at 20:18