After installing pip, the pip3 command is available, but the pip command is not found.

Asked 2 years ago, Updated 2 years ago, 290 views

Installation—pipe 20.1.1 documentation

Based on the procedures on the site above, I ran the following commands in order, and now I can use the pip3 command, but I can't find the pip command.

 curl https://bootstrap.pypa.io/get-pip.py-o get-pip.py
python get-pip.py

You can use the pip3 command as it is, but you can use the pip command for various information on books and the Internet, so it is troublesome to copy and execute it.

You can create aliases and make it easier to enter commands, but I am concerned that the pip command was not entered.Is there any reason, such as the decision to use only pip3 in the Python community (?) in the future?

environment:macos mojave 10.14.6

[Background]
When I put Anaconda in it, it seems that Python 3 came in (maybe Python 2 came in at the same time?), but it didn't put pip in it, so I put it in by myself.

Type python --version at the terminal to Python 2.7.10.
I thought this was old, so I typed python3 --version, and it was Python 3.7.7.
Therefore, Python itself is running on python3 instead of python (this is also laborious)

I ran get-pip.py because I noticed that there was no pip after I put in Anaconda, but I didn't realize that Python 2 would work if I hit Python as it is, so get-pip.py should have run on Python 2.

Anaconda itself is Anaconda3-2020.02-MacOSX-x86_64.pkg.

Additional
About Package Management with conda and pip - Qiita
I found an article like this

Now, a common saying is that when you use conda and pip together, it breaks. I'm not sure why you claim it breaks, but it's unusual to put conda and pip into the same package in the first place.

I see. There seems to be a command called conda. The reference I saw said that I put Anaconda in and then piped it, so I piped it...Python beginners don't know the ecosystem around here, so it's very nice...

python macos pip

2022-09-30 21:51

1 Answers

I think it is impossible to install Python 2.X and Python 3.X at the same time just by installing Anaconda.
Perhaps you had a Python 2.X environment installed before, and then Anaconda (Python 3.X).

If you install Anaconda (Python 2.X series) after installing Anaconda (Python 3.X series), you will get the name of pip, so you should save the executable file of the package under the name pip2.X series and pip3.


2022-09-30 21:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.