-
Notifications
You must be signed in to change notification settings - Fork 13
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
Problems connecting VSCode and Jupyter server #6
Comments
Thank you for reporting the issue. Certainly, the default behavior should be the ability to run cells out-of-the-box without encountering any additional configuration issues. Currently, the kernel is not automatically listed as execution environment in VSCode anymore. Workaround
Finally, you should get "Python_3 /opt/venv/bin/python" displayed as execution environment and I leave this issue open, until the situation resolves.. |
Referencing upstream issue: microsoft/vscode-jupyter#15163 |
@dklotz I had the same issue running on amd64 and managed to fix it by adding the following to the devcontainer "customizations": {
"vscode": {
"extensions": [
// force jupyter to default to our kernel on all notebooks
"donjayamanne.vscode-default-python-kernel"
],
"settings": {
// configure our venv to work with vscode automatically
"python.terminal.activateEnvironment": true,
"python.defaultInterpreterPath": "$/opt/venv/bin/python3.11"
}
}
} @jakoch In my opinion it would be worthwhile merging this change, unless you see any complications arising from it. |
Thanks, the workaround be @leviznull worked for me! I had to fix one typo (there's a |
set ipykernel name and display_name replaced deprecated c.ServerApp.token with c.IdentityProvider.token in notebook config updated readme, changelog, notebooks
nice workaround @leviznull |
First of all: thanks for all the effort, this looks like a great starting place for an AI/ML/Python devcontainer setup!
Sorry for using issues as a "support channel" - if that's not something you want to do, feel free to just close the issue!
I wanted to try this (on my M1 Macbook, so all this relates to the newly added arm64 support from #5) and I ran into the problem that when I opened/started the devcontainer, the jupyter server wasn't running (probably related to #1 - although I see that line has already been added to
devcontainer.json
). After manually startingstart-notebook.sh
, jupyter runs and I can connect to the web interface without problems. But when I opennotebooks/test.ipynb
inside of VSCode, it doesn't find any existing Jupyter kernels. I tried both offered options ("Python Environments" and "Existing Jupyter Server"), but haven't been succesfull with either:ipykernel
- which should already be there according to the Dockerfile.http://localhost:8888/
andhttp://localhost:8888/tree
(and the same with127.0.0.1
instead of localhost), but it fails to connect without any error message. I can see the following 404s in the log ofstart-notebook.sh
each time I try to connect the extension to the server, so maybe I just need to use a different URL?The text was updated successfully, but these errors were encountered: