M BUZZ CRAZE NEWS
// general

Error can't install pip or python

By Joseph Russell

When typing this following command:

python 

I am getting the following message in Ubuntu 17.10:

The program 'python' can be found in the following packages: * python-minimal * python3

And when typing these command python3 -V it tells me that it is python3.6.3?

Why is that happening?

When I type:

sudo apt install python3-pip

I get this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (9.0.1-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

But pip seems not to be installed, when I try:

sudo pip install BeautifulSoup4
sudo: pip: command not found
10

1 Answer

That behavior is perfectly normal for Ubuntu 17.10 as it contains no python 2.7 by default anymore

Python 2 is no longer installed by default. Python 3 has been updated to 3.6.
(from Release Notes)

The right line to use is:

python3

Beside that you can install pip for python 3.6 with the following command

sudo apt install python3-pip

This will install pip for python 3 which you can call with pip3 <command> or pip <command> (which does not seem to work in your case no clue why).

And for python 2.7 including its pip if you so wish with the following command:

sudo apt install python2.7 python-pip

To call pip for python 2 you need to use pip2 <command>.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy