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
The first and foremost thing to do is to check if you have already installed pip in your machine. In windows, you can check if the pip is located in the below directory. So just navigate to the directory and do check for pip.exe or pip3.exe files. If it's not present, then you need to install it.
PIP installation is not added to the system variable – In order to be able to run Python commands from a CMD window, you will need to add the path of your PiP installation to your PATH in the system variable. If you installed Python using the installation executable, it should be added automatically.
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.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip
Clearly the issue's with terminal, i.e. not recognizing the command so maybe pip isn't installed properly, but with what you've shown so far I don't think this issue should arise. Anyways give it a try.
What are you trying to install? pip is for python packages right.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With