Page 1 of 1

command failed: no module named pip WSL2 Ubuntu 20.04

Posted: Sat Mar 06, 2021 7:04 pm
by mcktimo
trying to config the Expressif-IDF 1.0.0 extension:

Running vscode on remote wsl2 target running ubuntu 20.04

Code: Select all

tim@omen:~$ pip -V
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Code: Select all

Command failed: "/home/tim/.espressif/python_env/idf4.2_py3.8_env/bin/python" -m pip install --no-warn-script-location -r "/home/tim/.vscode-server/extensions/espressif.esp-idf-extension-1.0.0/requirements.txt" /home/tim/.espressif/python_env/idf4.2_py3.8_env/bin/python: No module named pip
Any ideas

Re: command failed: no module named pip WSL2 Ubuntu 20.04

Posted: Mon Mar 08, 2021 7:10 am
by ESP_bignacio
It seems pip is not part of the virtual environment created in WSL 2

Can you try to search pip in /home/tim/.espressif/python_env/idf4.2_py3.8_env/bin/ maybe it is missing.

You can either delete and re make the virtual environment (pip should be included when created with virtualenv or venv) or install pip directly in this virtual environment.

To get pip just download this script

Code: Select all

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
and run

Code: Select all

/home/tim/.espressif/python_env/idf4.2_py3.8_env/bin/python get-pip.py

Re: command failed: no module named pip WSL2 Ubuntu 20.04

Posted: Tue Jun 15, 2021 5:45 am
by galewinston
On Mac using brew is a better option as apt-get is not available. Command:

Code: Select all

brew install python
In case you have both python2 & python3 installed on machine

Code: Select all

python2.7 -m ensurepip --default-pip
simply should solve the issue.

If instead you are missing pip from python 3 then simply change python2.7 to python3 in the command above.