pip is installed but command not found code example
Example 1: pip3 not found
sudo apt-get remove python3-pip; sudo apt-get install python3-pip
Example 2: bash: pip: command not found
apt-get install python3-pip
Example 3: pip command not found macos
sudo easy_install pip
Example 4: add pip to path
import os
import sys
pipPath = f'{os.path.dirname(sys.executable)}\\Scripts'
os.system(f'setx PATH "%PATH%;{pipPath}"')
Example 5: pip is not a batch command but python is installed
python -m pip install [packagename]