Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

I spent most of the day yesterday searching for a clear answer for installing pip (package manager for Python). I can't find a good solution.

How do I install it?

1 Answer

0 votes
by (106k points)
  • MacOS already have Python installed in it. To make sure that whether you have  Python installed or not open a terminal and run the below-mentioned command.

python --version

  • If this command runs perfect and returns a version number that means Python exists in your MacOs. Which also means that you already have easy_install in your MacOs. 
  • easy_install was released in 2004, as a part of setuptools. It was notable at the time for installing packages from PyPI(Python Package Index) using requirement specifiers and automatically installing dependencies.
  • Now, you just need to run the following command to install pip in your mac:-

sudo easy_install pip

  • Once this command runs successfully, pip will be installed in your MacOs and you will be able to use it for installing other packages.
  • You can also use  the following command

python get-pip.py

  • Another thing you can do is install it through Homebrew on MacOs
  • Homebrew is a package manager for MacOs. Once Homebrew is installed in your system(MacOs), run the given command to install the latest Python, Pip and other tools.

brew install python

  •  You can also run the following command for installing pip.

sudo -H python -m ensurepip

  • So I have mentioned every possible answer for you can use one which looks easy to you.

Related questions

+3 votes
2 answers
0 votes
1 answer
asked Oct 10, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
0 votes
1 answer
asked Jul 5, 2019 in Python by Sammy (47.6k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.7k users

Browse Categories

...