Skip to content
Advertisement

Ubuntu Command ‘pip’ not found, but there are 18 similar ones [closed]

I am trying to install a toolkit, I’m on WSL using ubuntu – I downloaded ubuntu yesterday. Here is what the installation process looks like for this toolkit. On windows cmd it says I have python 3.7.9 but on ubuntu its saying I have python 3.8.2

git clone https://github.com...
cd program
pip install -e .

or:

pip install program

pip install -e . is not working for me, I get this error:

user@DESKTOP-REA10BN:~/gym$ pip install -e .

Command 'pip' not found, but there are 18 similar ones.

however, I checked and I have pip installed, here’s what I checked for before running:

user@DESKTOP-REA10BN:~$ cd
> sudo apt-get install python-pip
cdsudo: command not found
user@DESKTOP-REA10BN:~$ python3 --version
Python 3.8.2
user@DESKTOP-REA10BN:~$ python3-pip --version
python3-pip: command not found
user@DESKTOP-REA10BN:~$ which pip3
/usr/bin/pip3
user@DESKTOP-REA10BN:~$ pip3 -V
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

my PATHS:

/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.812.0_x64__79rhkp1fndgsc:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0/:/mnt/c/windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/user/AppData/Local/Programs/Python/Python37-32/Scripts/:/mnt/c/Users/user/AppData/Local/Programs/Python/Python37-32/:/mnt/c/Users/user/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin

Advertisement

Answer

Short answer: Try running python3 -m pip install -e .


Some explanations:

The different versions of Python are not surprising. WSL is, effectively, an ultra-lightweight virtual machine. Your Windows python installation is entirely independent of the WSL python installation.

Python has two widely used major versions, Python 2 and Python 3. The command python runs some minor version of Python 2, while the command python3 runs some minor version of Python 3. Below is my console output.

lawruble@Balrog:~/scratch$ python --version
Python 2.7.18
lawruble@Balrog:~/scratch$ python3 --version
Python 3.8.5

Pip is the python installation manager, and has the same major versions as Python. The command pip runs the Python 2 version of pip, while pip3 runs the Python 3 version of pip.

It’s better practice to use python3 -m pip over pip3, it helps ensure that you’re using the version of pip associated with the version of python you expect to run.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement