close

[Solved] bash: pip: command not found

Hello Guys, How are you all? Hope You all Are Fine. I just installed python on my macOS and now I am trying to install pip packages It gives me bash: pip: command not found in Python. So Here I am Explain to you all the possible solutions here.

Without Wasting your time, Lets start This Article to Solve This Error.

How bash: pip: command not found Error Occurs ?

I just installed python on my macOS and now I am trying to install pip packages It gives me the following error.

bash: pip: command not found

How To Solve bash: pip: command not found Error ?

Question: How To Solve bash: pip: command not found Error ?
Answer: To Solve bash: pip: command not found Error You just need to update python version to python3 follow below step to install python3 in your macOS. install Homebrew, open Terminal or your favorite OSX terminal emulator and run:

Solution 1 : Just install Python3

To Solve bash: pip: command not found Error You just need to update python version to python3 follow below step to install python3 in your macOS

install Homebrew, open Terminal or your favorite OSX terminal emulator and run

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

insert the Homebrew directory at the top of your PATH environment variable. You can do this by adding the following line at the bottom of your ~/.profile file

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

Now, we can install Python 2.7:

$ brew install python

Get pip repository:

$ git clone https://github.com/pypa/pip

install pip:

$sudo easy_install pip

Solution 2 : Just Use pip3 Instaed of pip

Just use pip3 command instead of pip. Here is an example.

Do not Use:

pip install <name-of-install>

Right Way to Use:

pip3 install <name-of-install>

Solution 3 : Use easy_install

Install Python’s latest version as given here. It has many download links like NumPy and scipy. Then go to the terminal and enter the following command.

sudo easy_install pip

Solution 4 : Install Globaly

Installing using apt-get installs a system wide pip, not just a local one for your user. Try this command to get pip running on your system …

sudo apt-get install python-pip python-dev build-essential

Then pip will be installed without any issues and you will be able to use “sudo pip…”.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment