You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vscode version : 1.42.0
vscode-python version : 2020.2.62710
python version : 3.7.3 64-bits
os : windows 10
no venv, no anaconda
I just updated VScode and the python extension. When trying to run a Jupyter notebook or a Jupyter cell, it tries to start a Jupyter server but fails and gives an error notification asking to install more dependencies. When pressing the "Install" button, it tries to pip install kernelspec.
"C:/Program Files/Python37/python.exe" c:/Users/loudur01/.vscode/extensions/ms-python.python-2020.2.62710/pythonFiles/shell_exec.py "C:/Program Files/Python37/python.exe" -m pip install -U kernelspec --user C:/Users/loudur01/AppData/Local/Temp/tmp-14796WOIAB7kweneN.log
Executing command in shell >> C:/Program Files/Python37/python.exe -m pip install -U kernelspec --user
Collecting kernelspec
Could not find a version that satisfies the requirement kernelspec (from versions: )
No matching distribution found for kernelspec
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Traceback (most recent call last):
File "c:/Users/loudur01/.vscode/extensions/ms-python.python-2020.2.62710/pythonFiles/shell_exec.py", line 26, in <module>
subprocess.check_call(shell_args, stdout=sys.stdout, stderr=sys.stderr)
File "C:\Program Files\Python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
I tried uninstalling and reinstalling jupyter, rebooting the computer, running as admin.
Edit : rolling back to 2020.1.58038 and it works again
Louis Duret-Robert (@Louis-DR)Please could you provide a screenshot of the message and provide the logs from your extension. Please install the latest version to get the failures and get the logs from Help -> Toggle Developer Tools -> Console window.
Looks like the interpreter doesn't have kernelspec installed as part of Jupyter.
Please could you try one of the following:
Manually reinstall jupyter into C:/Program Files/Python37/python.exe
Or select another interpreter that has jupyter in it.
Patrick Nadeau (@patrick-nadeau) Please could you re-install jupyter or select another interpreter containing jupyter, looks like kernelspec cannot be located in the interpreter you have selected.
Don Jayamanne (@DonJayamanne) : I tried re-installing jupyter and selecting other interpreters containing jupyter. In fact, I had tried everything that Louis Duret-Robert (@Louis-DR) mentioned in his post above. Nothing worked. I confirmed that jupyter was working by running it successfully from the terminal outside of VScode. Also, this problem only started once I upgraded to vscode-python 2020.2.62710. The interactive terminal worked fine under 2020.1.58038.
Python: Installed via Enthought EDM into a new EDM environment. VSCode has already been set to find and use EDM environments and was working fine until latest update of vscode-python.
Use the command Select Interpreter to start Jupyter server
Select a Python 3 interpreter, if prompted please install jupyter or manually install jupyter into a python environment or use conda/miniconda if you have that.
You can still use a Python 2 kernel to run your code,
Don Jayamanne (@DonJayamanne) : Thanks, that seemed to fix it. Simply launching the interactive window from a Python 3 environment with jupyter installed seems to work. In fact, it seems I can now successfully launch the interactive window from a Python 2 environment, even after reloading VSCode.
Python interpreter displayed string is Python 3.7.6 64-bit ('jupyter': conda)
python.pythonPath is "C:\\software\\Anaconda\\envs\\jupyter\\python.exe"
The Jupyter server interpreter prompt was empty, selecting other interpreters didn't help.
I cleared out the python.condaPath
Running a debug script gives a python executable of C:\software\Anaconda\envs\jupyter\python.exe as expected and a path of C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\software\Anaconda\condabin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git LFS;C:\Program Files (x86)\GitExtensions\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\PuTTY\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\tim.mclennan\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft VS Code\bin;C:\Users\tim.mclennan\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\;C:\Users\tim.mclennan\AppData\Local\GitHubDesktop\bin;C:\Users\tim.mclennan\AppData\Local\Programs\Fiddler;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;
Manually activating the environment in a CMD based terminal adds C:\software\Anaconda\envs\jupyter;C:\software\Anaconda\envs\jupyter\Library\mingw-w64\bin;C:\software\Anaconda\envs\jupyter\Library\usr\bin;C:\software\Anaconda\envs\jupyter\Library\bin;C:\software\Anaconda\envs\jupyter\Scripts;C:\software\Anaconda\envs\jupyter\bin to the path and the script consequently works.
Trying to select the jupyter environment as the interpreter for running jupyter generates the same error as before. I've uploaded another log -1582245861149.log
One thing I noted is that it does seem to fail to find the list of conda environments here
console.ts:137 [Extension Host] Error Python Extension: 2020-02-21 13:38:19: Failed to get conda environment list from conda [Error: spawn conda ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:84:9)] {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn conda',
path: 'conda',
spawnargs: [ 'env', 'list' ]
}
Please could you update the setting python.condaPath with the fully qualified path to the conda executable. I think you had a invalid path previously. Since its unable to find the conda paths, its unable to properly activate the jupyter conda environment.
Yeah that got it working. I had to experiment with it a bit as it's not particularly clear what the setting should be, especially on Windows where the executable is a batch file.
Setting it to C:\software\Anaconda\condabin\conda.bat did the trick and everything appears to be working as expected.
Activity
patrick-nadeau commentedon Feb 12, 2020
I encountered this issue too on Mac OS with the same error. Rolling back vscode-python to
2020.1.58038also fixed it.rchiodo commentedon Feb 12, 2020
Hmm, not sure why we're trying to install kernelspec. We should be installing ipykernel.
Thanks for the bug, we'll look into it.
DonJayamanne commentedon Feb 12, 2020
Louis Duret-Robert (@Louis-DR)
Please could you provide a screenshot of the message and provide the logs from your extension. Please install the latest version to get the failures and get the logs fromHelp -> Toggle Developer Tools -> Console window.Looks like the interpreter doesn't have
kernelspecinstalled as part of Jupyter.Please could you try one of the following:
jupyterintoC:/Program Files/Python37/python.exeThanks
DonJayamanne commentedon Feb 12, 2020
I think i found the place this happens, we might want to get a point release out for this.
DonJayamanne commentedon Feb 12, 2020
Patrick Nadeau (@patrick-nadeau) Please could you re-install jupyter or select another interpreter containing jupyter, looks like
kernelspeccannot be located in the interpreter you have selected.patrick-nadeau commentedon Feb 12, 2020
Don Jayamanne (@DonJayamanne) : I tried re-installing jupyter and selecting other interpreters containing jupyter. In fact, I had tried everything that Louis Duret-Robert (@Louis-DR) mentioned in his post above. Nothing worked. I confirmed that jupyter was working by running it successfully from the terminal outside of VScode. Also, this problem only started once I upgraded to vscode-python
2020.2.62710. The interactive terminal worked fine under2020.1.58038.DonJayamanne commentedon Feb 12, 2020
Patrick Nadeau (@patrick-nadeau) Louis Duret-Robert (@Louis-DR)
Please could you provide the output of the following:
<python executable> --version<python executable> -m jupyter --version<python executable> -m jupyter kernelspec --versionDetails of your OS & Python interpreter:
patrick-nadeau commentedon Feb 12, 2020
Don Jayamanne (@DonJayamanne)
OS: MacOS Catalina 10.15.3
Python: Installed via Enthought EDM into a new EDM environment. VSCode has already been set to find and use EDM environments and was working fine until latest update of
vscode-python.python --version:python -m jupyter --version:python -m jupyter kernelspec --versionLouis-DR commentedon Feb 12, 2020
Sorry, I've left work so I don't have access to the computer. If still necessary, I'll give you the logs tomorrow morning (CET)
DonJayamanne commentedon Feb 12, 2020
Patrick Nadeau (@patrick-nadeau) Please could you use a Python 3 interpreter to start Jupyter.
Select Interpreter to start Jupyter serverPython 2kernel to run your code,& thanks for the feedback
patrick-nadeau commentedon Feb 12, 2020
Don Jayamanne (@DonJayamanne) : Thanks, that seemed to fix it. Simply launching the interactive window from a Python 3 environment with jupyter installed seems to work. In fact, it seems I can now successfully launch the interactive window from a Python 2 environment, even after reloading VSCode.
Install jupyter instead of installing kernel spec (#10080)
Install jupyter instead of installing kernel spec (#10080)
Install jupyter instead of installing kernel spec (#10080) (#10083)
50 remaining items
timmclennan commentedon Feb 21, 2020
Python 3.7.6 64-bit ('jupyter': conda)"C:\\software\\Anaconda\\envs\\jupyter\\python.exe"C:\software\Anaconda\envs\jupyter\python.exeas expected and a path ofC:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\software\Anaconda\condabin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git LFS;C:\Program Files (x86)\GitExtensions\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\PuTTY\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\tim.mclennan\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft VS Code\bin;C:\Users\tim.mclennan\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\;C:\Users\tim.mclennan\AppData\Local\GitHubDesktop\bin;C:\Users\tim.mclennan\AppData\Local\Programs\Fiddler;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\software\Anaconda\envs\jupyter;C:\software\Anaconda\envs\jupyter\Library\mingw-w64\bin;C:\software\Anaconda\envs\jupyter\Library\usr\bin;C:\software\Anaconda\envs\jupyter\Library\bin;C:\software\Anaconda\envs\jupyter\Scripts;C:\software\Anaconda\envs\jupyter\binto the path and the script consequently works.Trying to select the jupyter environment as the interpreter for running jupyter generates the same error as before. I've uploaded another log -1582245861149.log
One thing I noted is that it does seem to fail to find the list of conda environments here
Although they do show up in the interpreter list.
DonJayamanne commentedon Feb 21, 2020
Timothy McLennan (@timmclennan)
Thanks for getting back with the information.
Please could you update the setting
python.condaPathwith the fully qualified path to the conda executable. I think you had a invalid path previously. Since its unable to find the conda paths, its unable to properly activate thejupyterconda environment.timmclennan commentedon Feb 21, 2020
Yeah that got it working. I had to experiment with it a bit as it's not particularly clear what the setting should be, especially on Windows where the executable is a batch file.
Setting it to
C:\software\Anaconda\condabin\conda.batdid the trick and everything appears to be working as expected.Merge release branch into master (#10258)
Merge master again into ds/custom_editor (#10295)
rchiodo commentedon Feb 25, 2020
Validated by customers
Merge master into ds/custom_editor (#10322)
Quantium commentedon Nov 26, 2020
Same issue here.
I just selected an environment in the VSCode footer to fix it.