How to install pip to desired location?


If I use sudo apt-get install python-pip on my TX2, pip will be installed to /usr/lib/python2.7/dist-packages. And the version is 8.1.1. My TX2 is flashed by JetPack 3.3.
I want to upgrade pip so I followed this page and installed 19.1 to /usr/local/bin. Then I could not use this new pip to install any Python packages.
Is there a way to install pip 19.1 to /usr/lib/python2.7/dist-packages instead?
Thank you very much!


You can upgrade pip with this command:

$ sudo pip install --upgrade pip


No, I tried this before. This does not really upgrade pip. Pip is stuck at 8.1.1.

OK I just used pip3 then