microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.31k stars 293 forks source link

Unable to create interactive window, existing notebooks are shown as json files #15843

Closed abhisheksoni27 closed 2 months ago

abhisheksoni27 commented 4 months ago

Applies To

What happened?

I am currently not able to see interactive play elements on my run.py file.

My .ipynb files open as JSON.

I have Python as well as Jupyter extensions installed which are distributed by Microsoft.

image image

VS Code Version

Version: 1.91.1 Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:07:46.768Z (2 days ago) Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

Jupyter Extension Version

v2024.6.0

Jupyter logs

Visual Studio Code (1.91.1, undefined, desktop)
Jupyter Extension Version: 2024.6.0.
Python Extension Version: 2024.10.0.
Pylance Extension Version: 2024.7.1.
Platform: darwin (arm64).
Workspace folder ~/github/trading/algotrading, Home = /Users/abhisheksoni
14:18:14.169 [warn] No interpreter with path ~/github/trading/algotrading/.venv/bin/python3 found in Python API, will convert Uri path to string as Id ~/github/trading/algotrading/.venv/bin/python3
14:18:14.170 [info] Starting interactive window for resource '' with controller '.jvsc74a57bd070e568023ce40db8e86ad6511b69d121cd7702522e8997b095adf0103a97d48a./Users/~/github/trading/algotrading/.venv/python./Users/~/github/trading/algotrading/.venv/python.-m#ipykernel_launcher (Interactive)'
14:18:14.218 [warn] The following kernels use interpreters that are no longer valid or not recognized by Python extension, Kernels startUsingPythonInterpreter:'id=.jvsc74a57bd070e568023ce40db8e86ad6511b69d121cd7702522e8997b095adf0103a97d48a./Users/~/github/trading/algotrading/.venv/python./Users/~/github/trading/algotrading/.venv/python.-m#ipykernel_launcher'(interpreterId='~/github/trading/algotrading/.venv/bin/python') and valid interpreter ids include /Users/~/.pyenv/versions/3.10.4/bin/python, /Users/~/github/trading/algotrading/.venv/bin/python3, /usr/bin/python3

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

abhisheksoni27 commented 4 months ago

Any update on this @rebornix?

@bhavyaus could you please help in triaging this?

abhisheksoni27 commented 4 months ago

Anyone, any updates? :)

luabud commented 4 months ago

Hi @abhisheksoni27, I'm not sure this is actually the problem, but given there's an error message related to the Python environment you're trying to use, maybe you can try creating a new virtual environment? It may be helpful to run the "Python: Create Environment" command and then select "venv". Then make sure to select this new environment by running the "Python: Select Interpreter" command before you open the interactive window.

amunger commented 3 months ago

It sounds like the .ipynb support built in extension isn't activating, you could search the extensions sidebar for @builtin .ipynb to confirm.

Can you open the dev tools after trying to open a notebook and check the console for any errors from activating that extension? (command Developer: Open Developer tools)

vs-code-engineering[bot] commented 2 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!