0

I have python 3 installed on my mac. I have installed packages via python3 pip install up until now, but if I try to use pip install I'm getting pip not found error. How do I resolve this?

p.s: I just want to install packages via pip install and not python3 -m pip install.

iLuvLogix
  • 5,920
  • 3
  • 26
  • 43
Sannix19
  • 75
  • 1
  • 6
  • 1
    Does this answer your question? [How to change pip3 command to be pip?](https://stackoverflow.com/questions/44455001/how-to-change-pip3-command-to-be-pip) – Abinav R Aug 24 '21 at 09:02

4 Answers4

1

You can set alias in your ~/.bash_profile and try

alias pip=pip3
#or
alias pip=python3 pip
Satya
  • 5,470
  • 17
  • 47
  • 72
1

I have found in the end that this is the right way to do it:

https://opensource.com/article/19/5/python-3-default-mac

The actions to take in order to achieve this it's easy. Take the first 3 steps from the blog.

After that you can install any of versions available from this list, using this command to show it: pyenv install -l

Why you should do this way requires you to read the entire post.

0

Change alias in your terminal profile file

if you use bash goto ~/.bashrc file and

alias pip=pip3

if you use zsh goto ~/.zshrc file and do the same

Abinav R
  • 365
  • 2
  • 16
0

do this on terminal:

alias pip=pip3

or use :

pip3 install <library_name>