-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode tries to install pip and ipykernel on WSL2 with venv and ipykernel already configured #9416
Comments
THanks for filing this issue, I"m sorry you're running into this. |
That IS the whole output, the first thing it tries to do is install pip via python's built in get-pip/py, and as explained it is unnecessary to even try that and clearly fails because it tries to install old distutils (because get-pip is not maintained) again, VSCode should not try to install pip ever anyway, and if it actually just used the pip installed and callable there would be no issues like this from trying to install old deprecated code over an updated environemnt |
The reason we're trying to install pip is we've haven't been able to install pip. We've found a number of instances where pip isn't available hence we decided to install that and unblock the users. However that logic seems to be failing in your case.
Please confirm you are sending all of the output from here : |
@chrisdlangton just chekcing if you've managed to get the logs for this issue. |
Closing this issue as its been over 4 weeks, since the information was requested. |
Version
Microsoft Windows [Version 10.0.22572.100]
WSL Version
WSL 2
Kernel Version
5.10.93.2
Distro Version
Ubuntu 20.04
Other Software
via pip
ipykernel 6.9.2
VSCode
February 2022 (version 1.65)
Remote - WSL v0.64.2
Repro Steps
as described https://code.visualstudio.com/docs/datascience/jupyter-notebooks
ran
python3.9 -m venv .venv
then in VSCode Ctrl+Shift+P selected the
.venv/bin/python
ensured Workspace Trust was given
created a new .ipynb file and opened it in VSCode
selected the kernel using the kernel picker in the top right and chose
.venv/bin/python
added
print("works")
to the cell, made sure it was a "Python" cell. Shift+Enterprompts to install
ipykernel
using pip, I clicked "install" and a terminal inside VSCode runs the commands and the output of these are below in the diagnostic logs.I install
ipykernel
myself and the following packages were also installed;As shown
ipykernel-6.9.2
now existsin the cell Shift+Enter prompts to install
ipykernel
using pip again, and the exact same output in the diagnostic logs.Expected Behavior
I have ipykernel installed and i have pointed VSCode to use the correct venv and correct kernel location. pip is installed so why is VSCode stuck on
get-pip
?? I expect to just have the cell execute with this setup.off topic; worth adding so it is not in any reply. Both a remote (in docker) Jupyter server AND using the host python/pip works just fine but both are not in-scope to this issue.
Actual Behavior
VSCode tried to install pip, and there is a setuptools issue related to the pip install already being complete.
pip is available to VSCode in all other aspects of the VSCode+Python/Pylance operation, it is just when using Jupyter VSCode is mistaken in trying to install pip for no good reason. When that fails it is a red herring, VSCode should not be trying to install pip or the ipykernel in the first place.
This issue aims to have a python interpreter via the venv and the ipykernel installed into that venv (not in docker or on the host).
Diagnostic Logs
The text was updated successfully, but these errors were encountered: