Skip to content

Python environments failing to be found #18478

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

Closed
inobrevi opened this issue Feb 8, 2022 · 9 comments
Closed

Python environments failing to be found #18478

inobrevi opened this issue Feb 8, 2022 · 9 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster investigating We are looking into the cause of the issue

Comments

@inobrevi
Copy link

inobrevi commented Feb 8, 2022

Environment data

  • VS Code version: Version: 1.64.0 (system setup)
  • Jupyter Extension version (available under the Extensions sidebar): v2022.1.1001775990
  • Python Extension version (available under the Extensions sidebar): v2022.0.1786462952
  • OS (Windows | Mac | Linux distro) and version: Windows_NT x64 10.0.19042
  • Python and/or Anaconda version: 3.9 and 3.10
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): ALL
  • Jupyter server running: Local

Expected behaviour

Jupyter should find at least one environment and everything was working fine until it didn't.

Actual behaviour

No environment/kernels available/detected.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

UNKNOWN, just started to not work. I reinstalled and restarted almost everything, only didn't reinstall the whole system.
Started with numpy not having some libraries (with no changes to anything), I reinstalled Anaconda, restarted everything. Anaconda works in Poweshell and loads correctly. I tried every trick to reset and do it right. Nothing worked.

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

Visual Studio Code (1.64.0, undefined, desktop)
Jupyter Extension Version: 2022.1.1001775990.
Python Extension Version: 2022.0.1786462952.
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 11:42:22: ZMQ install verified.
Info 11:42:23: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Warn 11:42:26: Unable to create a controller for jupyter-notebook without an active interpreter.
Info 11:42:26: Find preferred kernel for c:\Users\[notebook_path].ipynb with metadata {"interpreter":{"hash":"f0eb7952fea26dd991a448ee1aa1847a5c0ca351d8848665d51ebfd4896d4292"},"kernelspec":{"display_name":"Python 3.9.7 ('base')","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.7"},"orig_nbformat":4} & preferred interpreter 
Info 11:56:48: Loading webview. View is notset
Info 11:56:48: Loading web view...
Info 11:56:48: Webview panel created.
Info 11:56:49: Web view react rendered
Info 11:56:50: Searching for token colors ...
Info 11:56:50: Attempting search for colors ...
Info 11:56:50: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 11:56:50: Attempting search for colors ...
Info 11:56:50: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 11:56:51: Using colors to generate CSS ...
Info 11:57:17: Searching for token colors ...
Info 11:57:17: Attempting search for colors ...
Info 11:57:17: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 11:57:17: Attempting search for colors ...
Info 11:57:17: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 11:57:17: Using colors to generate CSS ...
Info 19:28:21: Searching for token colors ...
Info 19:28:21: Attempting search for colors ...
Info 19:28:21: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:28:21: Attempting search for colors ...
Info 19:28:21: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:28:21: Using colors to generate CSS ...
Info 19:28:32: Searching for token colors ...
Info 19:28:32: Attempting search for colors ...
Info 19:28:32: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:28:32: Attempting search for colors ...
Info 19:28:32: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:28:32: Using colors to generate CSS ...
Info 19:29:00: Searching for token colors ...
Info 19:29:00: Attempting search for colors ...
Info 19:29:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:29:00: Attempting search for colors ...
Info 19:29:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:29:00: Using colors to generate CSS ...
Info 19:29:41: Searching for token colors ...
Info 19:29:41: Attempting search for colors ...
Info 19:29:41: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:29:41: Attempting search for colors ...
Info 19:29:41: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-defaults\themes\dark_plus.json ...
Info 19:29:41: Using colors to generate CSS ...

@ghost ghost assigned rchiodo Feb 8, 2022
@rchiodo
Copy link

rchiodo commented Feb 8, 2022

Thanks for the issue. Jupyter output log can be found here:

image

Can you try posting the contents of that panel? It should show the results from us trying to find kernels.

@inobrevi
Copy link
Author

inobrevi commented Feb 8, 2022

Ok, I found it. Edited into original post.

@rchiodo
Copy link

rchiodo commented Feb 8, 2022

Can you include the python output as well? We ask the python extension for the list of interpreters on the machine. That output makes it look like the python extension didn't find any.

@inobrevi
Copy link
Author

inobrevi commented Feb 8, 2022

Infinite stream of:

[ERROR 2022-1-8 19:40:23.137]: No python is installed or a refresh has not already been triggered

Well, seems like it is not jupyter problem...

@inobrevi
Copy link
Author

inobrevi commented Feb 8, 2022

Experiment 'pythonaacf' is active
Experiment 'pythonTensorboardExperiment' is active
Experiment 'PythonPyTorchProfiler' is active
Experiment 'pythonDeprecatePythonPath' is active
[ERROR 2022-1-8 11:42:26.290]: [SyntaxError: Invalid regular expression: /c:(\\|/)Users(\\|/)[user_name](\\|/)[path](\\|/)[patch](\\|/)[patch]/: Range out of order in character class
	at new RegExp (<anonymous>)
	at h (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:104:312461)
	at d.getDisplayCommands (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:104:312240)
	at d.logProcess (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:104:311978)
	at s.emit (events.js:315:20)
	at shellExec (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:52:33373)
	at Object.t.shellExecute (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:24:74106)
	at processTicksAndRejections (internal/process/task_queues.js:93:5)
	at async Object.t.getInterpreterInfo (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:104:31827)
	at async c.p [as workerFunc] (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:52:5037)
	at async start (c:\Users\[user_name]\.vscode\extensions\ms-python.python-2022.0.1786462952\out\client\extension.js:104:29648)]

Begging of log

@rchiodo
Copy link

rchiodo commented Feb 8, 2022

Okay I'll transfer your issue to the python team.

@rchiodo rchiodo transferred this issue from microsoft/vscode-jupyter Feb 8, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 8, 2022
@rchiodo rchiodo changed the title Jupyter doesn't see python kernels (normal and anaconda env) Python environments failing to be found Feb 8, 2022
@rchiodo rchiodo removed their assignment Feb 8, 2022
@karthiknadig karthiknadig added area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug triage and removed triage-needed Needs assignment to the proper sub-team labels Feb 8, 2022
@karrtikr
Copy link

karrtikr commented Feb 8, 2022

Closing as dup of #18437

@karrtikr karrtikr closed this as completed Feb 8, 2022
@inobrevi
Copy link
Author

inobrevi commented Feb 9, 2022

Duplicate didn't help my case.
I reinstalled the VS Code (deleting Code and .vscode folders also). Reinstalling clean python 3.10.2 still didn't work.
Python is directly on C drive so there is no complicated path or name. Also tested in user space. It is registered in path. It should work as always.

Everything was working fine until last update of VS Code (python extension to be exact)

Edit: downgrading to v2021.12.1559732655 fixed problem for me. That means that something is wrong with newest version. Please fix it.

I would say that this is more dub of #18436

@karrtikr karrtikr reopened this Feb 9, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 9, 2022
@karrtikr karrtikr added investigating We are looking into the cause of the issue and removed triage triage-needed Needs assignment to the proper sub-team labels Feb 9, 2022
@karrtikr
Copy link

Fix should be out in the pre-release version of the extension in a day, use the following to try it out:

image

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Apr 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster investigating We are looking into the cause of the issue
Projects
None yet
Development

No branches or pull requests

4 participants