Reputation: 83
So, I've used homebrew to install python on my MPB (Catalina OS) and currently have both the system python (2.7.16) and python3 (3.9.0). Using "which" I get the following:
$ which python
/usr/bin/python
$ which python3
/usr/bin/local/python3
When I type "pip list" I get
$ pip list
zsh: command not found: pip
Yet if I type the following I get this:
$ python3 -m pip --version
pip 20.3.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
What's going on that pip (and pandas) are installed within the python3.9 directory but zsh doesn't find them? It is an 'alias' issue I need to fix? I'm concerned to mess with the system python 2. Help!
Upvotes: 2
Views: 8727
Reputation:
Create a symlink in one of the directories in your PATH variable or manipulate the PATH variable in your shell environment:
Look it up by echo $PATH
- my result would be:
/usr/local/sbin:/usr/local/bin:...
Now I can create a symlink in one of my directories by:
ln -s /usr/local/lib/python3.9/site-packages/pip /usr/local/bin/pip
or add /usr/local/lib/python3.9/site-packages/
to my PATH by
PATH=$PATH:/usr/local/lib/python3.9/site-packages/; export PATH
Then you would be able to find pip and execute it in zsh.
Upvotes: 1