Skip to content
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

Notebooks + virtual env = no widget, no graphs ? #10695

Closed
camelator opened this issue Jul 1, 2022 · 3 comments · Fixed by #10720
Closed

Notebooks + virtual env = no widget, no graphs ? #10695

camelator opened this issue Jul 1, 2022 · 3 comments · Fixed by #10720
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster ipywidgets Rendering, loading, saving, anything to do with IPyWidgets verified Verification succeeded
Milestone

Comments

@camelator
Copy link

I am using last studio code and last python plugin
I am using venv to manage my environments.
I am on ubuntu 20.04

Using 'no environement' the ipykernel correctly displays the widgets and graphics
using my .venv environnement displays nothing

here are some details coming from the python output, and there are a lot of differences and maybe errors.
Any help???

1/ python from my standard installation
info 19:0:1.767: Started kernel Python 3.8.10 64-bit, (Raw session started and connected)
info 19:0:1.771: Finished connecting e3ecc4ca-70a9-462c-a6e8-c4a15152f171
info 19:0:1.904: UpdateWorkingDirectoryAndPath in Kernel
info 19:0:1.905: Executing silently Code (idle) = import os\nimport sys\n%cd "/home/christian/code/captain/notebooks"\nif os.getcwd() not in sys.path:
info 19:0:1.999: Executing silently Code (completed) = import os\nimport sys\n%cd "/home/christian/code/captain/notebooks"\nif os.getcwd() not in sys.path:
info 19:0:1.999: Waiting for idle on (kernel): 22e3f0f4-0c47-4b64-8a34-e68a5a8d0690 -> idle
info 19:0:2.0: Finished waiting for idle on (kernel): 22e3f0f4-0c47-4b64-8a34-e68a5a8d0690 -> idle
info 19:0:35.540: Execute Cell 0 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:0:35.541: Execute Cell 1 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:0:35.541: Execute Cell 2 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:0:35.541: Execute Cell 3 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:0:35.541: Execute Cell 4 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:0:36.859: Cell 0 executed with state Success
info 19:0:36.956: Cell 1 executed with state Success
info 19:0:37.174: �[32mFetch Script for {"moduleName":"jupyter-threejs","moduleVersion":"^2.1.0"}
info 19:0:37.174: �[32mFetch Script for jupyter-threejs
info 19:0:37.179: �[32mSearching for Widget Script jupyter-threejs#^2.1.0 at path: file:///home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/3ad1f1cafba3c87fa812f3bd39ec27f1c145501f7dfdb9d2886646377f486cb4/index.js
info 19:0:37.241: �[32mWidget Script jupyter-threejs#^2.1.0 found at path: file:///home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/3ad1f1cafba3c87fa812f3bd39ec27f1c145501f7dfdb9d2886646377f486cb4/index.js
info 19:0:37.243: Script source for Widget jupyter-threejs@^2.1.0 was found from source cdn
info 19:0:37.243: �[32mScript for jupyter-threejs, is https://vscode-remote%2Bssh-002dremote-002bchristian-002dnano.vscode-resource.vscode-cdn.net/home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/3ad1f1cafba3c87fa812f3bd39ec27f1c145501f7dfdb9d2886646377f486cb4/index.js from cdn
info 19:0:37.332: Cell 2 executed with state Success
info 19:0:37.595: Cell 3 executed with state Success
info 19:0:38.12: Cell 4 executed with state Success

2/ Python from .venv
info 19:1:29.637: Started kernel .venv (Python 3.8.10), (Raw session started and connected)
info 19:1:29.640: Finished connecting e3ecc4ca-70a9-462c-a6e8-c4a15152f171
info 19:1:29.785: UpdateWorkingDirectoryAndPath in Kernel
info 19:1:29.786: Executing silently Code (idle) = import os\nimport sys\n%cd "/home/christian/code/captain/notebooks"\nif os.getcwd() not in sys.path:
info 19:1:29.852: Executing silently Code (completed) = import os\nimport sys\n%cd "/home/christian/code/captain/notebooks"\nif os.getcwd() not in sys.path:
info 19:1:29.853: Waiting for idle on (kernel): d94b520b-617b-4a0a-b16b-33630b4f5c1c -> idle
info 19:1:29.854: Finished waiting for idle on (kernel): d94b520b-617b-4a0a-b16b-33630b4f5c1c -> idle
info 19:1:38.27: Execute Cell 0 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:1:38.28: Execute Cell 1 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:1:38.28: Execute Cell 2 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:1:38.28: Execute Cell 3 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:1:38.28: Execute Cell 4 /home/christian/code/captain/notebooks/displayGyro1.ipynb
info 19:1:38.856: Cell 0 executed with state Success
info 19:1:38.956: Cell 1 executed with state Success
info 19:1:39.217: Cell 2 executed with state Success
info 19:1:39.520: Widget Script file /home/christian/code/captain/.venv/share/jupyter/nbextensions/bqplot/index.js mapped to /home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/nbextensions/71d3d2c1c8aa0903bf2663d5a9be3ecff6a4a665677316058270fa56af20b9daindex.js
info 19:1:39.520: Widget Script file /home/christian/code/captain/.venv/share/jupyter/nbextensions/ipyvolume/index.js mapped to /home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/nbextensions/166686fa7e115586e46d5f3196c5c35729f239375df44f1b3a7bb8365b577769index.js
info 19:1:39.520: Widget Script file /home/christian/code/captain/.venv/share/jupyter/nbextensions/jupyter-datawidgets/index.js mapped to /home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/nbextensions/49081dd785224efd341476b23fd5323862262f2d83fcaefc32645c2abd28a1adindex.js
info 19:1:39.520: Widget Script file /home/christian/code/captain/.venv/share/jupyter/nbextensions/jupyter-ros/index.js mapped to /home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/nbextensions/bf5e6a506b7f935e6d620713d89c369a3bca4e00a67dc8ec905c020034b88906index.js
info 19:1:39.520: Widget Script file /home/christian/code/captain/.venv/share/jupyter/nbextensions/jupyter-threejs/index.js mapped to /home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/nbextensions/4ac7990b09c5509bdfa776c562c5b1a9d89e0391dbb0cf06d6f93617ede4dccaindex.js
info 19:1:39.520: Widget Script file /home/christian/code/captain/.venv/share/jupyter/nbextensions/jupyter-webrtc/index.js mapped to /home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/nbextensions/c2059d1dbe92e7aa7607b72eb688111821398b6e03d193109851e6051bd96973index.js
info 19:1:39.524: �[32mFetch Script for {"moduleName":"jupyter-threejs","moduleVersion":"^2.1.0"}
info 19:1:39.524: �[32mFetch Script for jupyter-threejs
info 19:1:39.524: �[32mSearching for Widget Script jupyter-threejs#^2.1.0 at path: file:///home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/3ad1f1cafba3c87fa812f3bd39ec27f1c145501f7dfdb9d2886646377f486cb4/index.js
info 19:1:39.574: Cell 3 executed with state Success
info 19:1:39.590: �[32mWidget Script jupyter-threejs#^2.1.0 found at path: file:///home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/3ad1f1cafba3c87fa812f3bd39ec27f1c145501f7dfdb9d2886646377f486cb4/index.js
info 19:1:39.592: Script source for Widget jupyter-threejs@^2.1.0 was found from source cdn
info 19:1:39.592: �[32mScript for jupyter-threejs, is https://vscode-remote%2Bssh-002dremote-002bchristian-002dnano.vscode-resource.vscode-cdn.net/home/christian/.vscode-server/extensions/ms-toolsai.jupyter-2022.5.1001601848/tmp/scripts/3ad1f1cafba3c87fa812f3bd39ec27f1c145501f7dfdb9d2886646377f486cb4/index.js from cdn
error 19:1:39.806: Widget load failure {} {
className: 'BoxGeometryModel',
moduleName: 'jupyter-threejs',
moduleVersion: '^2.1.0',
cdnsUsed: false,
isOnline: true,
timedout: false,
error: '{}'
}
info 19:1:39.851: Cell 4 executed with state Success

@github-actions github-actions bot added the triage-needed Issue needs to be triaged label Jul 1, 2022
@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Jul 5, 2022
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jul 7, 2022

error 19:1:39.806: Widget load failure {} {
className: 'BoxGeometryModel',
moduleName: 'jupyter-threejs',

Looks like the widget might not be installed into the new .venv environment
Please could you install the pythreejs widget exension as follows:

  • Activate your environment .venv
  • Then run the following two commands
    • jupyter nbextension install --sys-prefix --py pythreejs

    • jupyter nbextension enable --sys-prefix --py pythreejs

Instructions for installing pythreejs widget into each env can be found here https://pythreejs.readthedocs.io/en/stable/#quickstart

@DonJayamanne DonJayamanne assigned DonJayamanne and unassigned rchiodo Jul 7, 2022
@DonJayamanne DonJayamanne added ipywidgets Rendering, loading, saving, anything to do with IPyWidgets bug Issue identified by VS Code Team member as probable bug labels Jul 7, 2022
@DonJayamanne DonJayamanne reopened this Jul 7, 2022
@greazer greazer added info-needed Issue requires more information from poster and removed triage-needed Issue needs to be triaged labels Jul 7, 2022
@DonJayamanne
Copy link
Contributor

@camelator
If the above doesn't work, please try this in the latest Pre-release version of the Jupyter extension, this has been fixed as part of #10720 & #10726

@DonJayamanne DonJayamanne added this to the July 2022 milestone Jul 11, 2022
@camelator
Copy link
Author

hi,
installing the pre release version working fine!
thanks a lot

@connor4312 connor4312 added the verified Verification succeeded label Jul 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster ipywidgets Rendering, loading, saving, anything to do with IPyWidgets verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants