I installed Python 3 with Homebrew and a tool I was installing through Homebrew auto-installed Python 2.x. So, I have both and pip (etc) is installed for both, unlike the macOS default Python.
Python tools that I download through Homebrew/Core work fine. Anything I install through pip, pip2, pip3 gives me a bash response of "command not found".
ImgurDownloader
-bash: ImgurDownloader: command not found
ImgurDownloader -h
-bash: ImgurDownloader: command not found
Pip, itself, finds these tools installed without issue and believes they are all set up and ready to go.
pip show ImgurDownloader
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Name: ImgurDownloader
Version: 1.0
Summary: Download and discover imgur albums
Home-page: https://github.com/tiberiuichim/imgur-album-recursive-downloader
Author: Tiberiu Ichim
Author-email: tiberiu.ichim@gmail.com
License: GPL3
Location: /usr/local/lib/python2.7/site-packages
Requires: xdg, click, awesome-slugify, requests
Required-by:
The problem is not restricted to the tool used as an example above; it happens with every pip installed tool.
What's going on? Are the two Pythons crossing wires? Is there something missing from my path?
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/Developer:/usr/local/ardua:/Applications/LibreOffice.app/Contents/MacOS/soffice:/usr/local/sbin:/usr/local/opt/ncurses/bin:/usr/local/opt/nss/bin:~/Library/Python/2.7/bin:~/Library/Python/2.7/lib/python/site-packages:/usr/local/opt/python2/bin:/usr/local/opt/python2/libexec:/usr/local/lib/python2.7/site-packages:/Library/Python/2.7/site-packages:/usr/local/opt/sphinx-doc/bin
I can't figure out how to fix this because I don't understand what's broken.
--no-site-packages
so that it wont use the system packages. Then from that virtual environment do a pip3 install whatever you need. In other words:virtualenv -p /path/to/homebrew/python3 --no-site-packages foo
. Thensource foo/bin/activate
and finallypip3 isntall bar