import py3Dmol
v = py3Dmol.view(query='1ycr',js='http://localhost/3Dmol/build/3Dmol.js')
v.setStyle('cartoon')
v.zoomTo()
v.spin()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
<py3Dmol.view at 0x7f0c456d5c40>
v.apng(100)