RaspBerry doesn't find pip3

Viewed 50023

I installed Python 3.4 with this website. (I installed it with sudo apt-get python3.4)

IT finished without any problems and if I type:

python --version

I get back:

python 3.4.4

But if I then want to make something with PIP3 it says:

-bash: pip3: command not found

Trying it for pip brings the same.

I need pip3 to install Adafruit-Blinka

What can I do?

I also tryed:sudo apt-get install python-pip This installs normal pip, there seems to be no install for pip3.

Thanks!

4 Answers
sudo apt-get install python3-pip

This should install pip3 for managing Python3 libraries. If you're using rasbian that is.
python-pip is for Python2 (as of 2019-09-09) if you need that too.

pip and python are two separate entities. There for installing one doesn't necessarily mean the other will be installed.

Some good documentation on the matter can be found at raspberrypi.org

And others have asked the same question on the official forums.

Just remember, most "safe" distro's tend to default to Python2 for their LTS platforms pre 2020. Meaning you will have to essentially add python3-<lib> (the 3 being the crucial element here) to all your installations. Otherwise you'll most likely get the Python2 equivilant of the library/tool for as long as Python2 is the default python environment in your distro. Like in this case.

Again, I'm using Arch Linux ARM for the most part, so I'm not to familiar with debian/ubuntu/etc distro's for the RPi platform. But that package should be called about the same as in Arch :)

Even though Python3 install 'should' install the latest pip with it, in mho, it does not. If you have a previous version of Python it likely has the previous version of pip. To install the latest version after installing python3:

python3 -m pip install --upgrade pip

This could lead to issues with other python versions or other programs using previous pip version.

See here on resolving the issues: https://github.com/pypa/pip/issues/5599

On linux, you could use: sudo apt install python3-pip

Because I use python3.6 (check your version via sudo python3 --version ), I had to use:

sudo python3.6 -m pip install --upgrade pip

to get pip3 installed properly.

It looks like the correct command name to use is: pip-3.2.

Related