Register to get access to free programming courses with interactive exercises

Installing pip Python: Setting up the environment

When you install Python on macOS or Windows and follow our recommendations, pip installs with the interpreter. On Ubuntu, you have to install it separately with this command:

sudo apt update
sudo apt install python3-pip

Running pip

You can call pip directly with the pip command, but it is better to use a longer one. It guarantees to bring up the latest installed pip version for the desired version of Python.

So, let us call pip:

python3 -m pip --version

pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

When showing its version, pip also tells you where it locates and what version of Python it runs on.

Note the structure of the command we called. This command means «python3, run the -m module named pip as a program with the --version parameter».

If you later see commands like pip help in the pip documentation, you can call python3 -m pip help. The result will be the same.

Sign up

Programming courses for beginners and experienced developers. Start training for free

  • 130 courses, 2000+ hours of theory
  • 1000 practical tasks in a browser
  • 360 000 students
By sending this form, you agree to our Personal Policy and Service Conditions

Our graduates work in companies:

<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.bookmate">Bookmate</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.healthsamurai">Healthsamurai</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.dualboot">Dualboot</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.abbyy">Abbyy</span>
Suggested learning programs
profession
new
Developing web applications with Django
10 months
from scratch
under development
Start at any time

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Toto Image

Ask questions if you want to discuss a theory or an exercise. Hexlet Support Team and experienced community members can help find answers and solve a problem.