After successfully installing pip using python setup.py install, the next step in the tutorial is to run pip install to install a specific library. However, upon running the pip install, is am encountering the error “bash: pip: command not found” on Mac OS X.
If you’re encountering “command not found” issues with pip
, you can try using pip3
instead, especially if you’re using Python 3.x. pip3
is typically installed automatically alongside Python 3.x. You can check its version with:
pip3 --version
If pip3
is installed, you should see output similar to:
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)
Replace pip
with pip3
in your commands. For example, to install Flask, use:
pip3 install Flask
If pip3
is not found, you might need to install it separately.
After downloading Python 3.x.x and attempting to install AWS CLI using pip install awscli
, you encountered the error pip: command not found
. Following the instructions, you switched to using pip3 install awscli
, which installed the AWS CLI correctly.
You mentioned that you’ve created an alias on your machine to run python3
when typing python
, as the system version is 2.7. However, you’re reconsidering this approach and intend to use the commands as intended.
It’s generally a good practice to use pip3
for Python 3.x.x installations to avoid conflicts with the system’s Python 2.7. Using aliases to manage different Python versions can be convenient, but you should be cautious to avoid unexpected behaviors or conflicts.