[Bug Report]: pip is not part of the virtual environment created in WSL 2. (VSC-657)
See original GitHub issueAs noted by @brianignacio5 in a post on esp32.com, pip is not part of the virtual environment created in WSL 2. It is not clear to me whether this is due of the ESP-IDF extension setup or not.
@brianignacio5 , you had asked the OP of that thread to check if pip was in his idf4.2_py3.8_env/bin/
. For me it was not. I only saw two symbolic links to the python3 binary:
lrwxrwxrwx 1 chris chris 7 May 11 17:21 python -> python3
lrwxrwxrwx 1 chris chris 16 May 11 17:21 python3 -> /usr/bin/python3
After following your pip install directions in that post, and after using the ESP-IDF Setup again, the setup completed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Installing venv for python3 in WSL (Ubuntu) - Stack Overflow
I am trying to configure venv on Windows Subsystem for Linux with Ubuntu. What I have tried: 1) Installing venv through pip (...
Read more >command failed: no module named pip WSL2 Ubuntu 20.04
Running vscode on remote wsl2 target running ubuntu 20.04 ... It seems pip is not part of the virtual environment created in WSL...
Read more >1. Installation - Flask Web Development, 2nd Edition [Book]
Flask has no native support for accessing databases, validating web forms, ... The creation of virtual environments is an area where Python 3...
Read more >How to properly install Pipenv on WSL Ubuntu 18.04?
Am trying to set up a python environment in Windows Subsystem for Linux and everything seems to break when I install pipenv. Steps...
Read more >noloadj - PyPI
solving constrained optimization problem for the design of engineering systems. ... How to configure a virtual environment on WSL running with a Ubuntu ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Agreed. I did not know that document existed. A clear link in the “install” document would be very helpful there.
This misses the issue regarding pip not being installed into the virtual environment. I had pip installed before the creation of the python virtual environment and yet I saw the error mentioned in #8 above. A manual install of pip into that virtual environment was required to continue the ESP-IDF extension install.
I’m happy to contribute where I can. 😄
Just in case it is relevant, I’m using WSL2 on a standard Windows 10 Pro install.
I am running the Remote WSL extension on a Windows-based VS Code. I had initially installed VS Code directly into the WSL distribution, but a warning message described the “proper” way to use VS Code with WSL, so I uninstalled VS Code from WSL and switched to using the Remote WSL extension.
I decided to try this again from scratch, so I installed a new Ubuntu distribution. I intentionally installed nothing before beginning just to see what errors popped up.
Here is my \home\chris.vscode-server\extensions\espressif.esp-idf-extension-1.0.3\esp_idf_vsc_ext.log log. It has been edited with breaks to show where I was during the install. The break notes FOLLOW the log output, as I simply typed what had happened and saved the file. There are two more outputs in files below.
Here are the steps taken:
build-essentials
and such. The installation of the C/C++ Extension Pack continued after it installed the libraries and reloaded VS Code.sudo apt install cmake
sudo apt install ninja-build
/usr/bin/python3 -m pip
was invalidsudo apt install python3 python3-pip
.python3-venv
was missing"/usr/bin/python3 -m pip" is not valid.
. I had not clicked the close button on that error. Obviously this could be confusing./home/chris/.espressif/python_env/idf4.2_py3.8_env/bin/python: No module named pip
/home/chris/.espressif/python_env/idf4.2_py3.8_env/bin/python ./get-pip.py
/home/chris/esp/esp-idf/install.sh
script as suggested by the build output. They seem to both do the same thing.Final Thoughts
A few thoughts about the “ESP-IDF: Configure ESP-IDF extension” process that came out of this:
python3
itself,python3-pip
, andpython3-venv
)