Closed
Description
Related issue nglviewer/nglview#1085.
pip install nglview==3.1.0
import nglview
view = nglview.show_pdbid("3pqr") # load "3pqr" from RCSB PDB and display viewer widget
view
The example above works in jupyter notebook, but it does not work in vscode. Changing version of nglview and ipywidgets does not fix the problem.
The important part of the log is
Failed to load model class 'ColormakerRegistryModel' from module 'nglview-js-widgets'
Error: No version of module nglview-js-widgets is registered
nglview-js-widgets is in the cdn https://cdn.jsdelivr.net/npm/nglview-js-widgets/.
jupyter.widgetScriptSources has been configured per https://github.com/microsoft/vscode-jupyter/wiki/IPyWidget-Support-in-VS-Code-Python.
It seems that something goes wrong when loading the module.