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

Installation issue #1052

Closed
Faezov opened this issue Mar 30, 2023 · 1 comment
Closed

Installation issue #1052

Faezov opened this issue Mar 30, 2023 · 1 comment

Comments

@Faezov
Copy link

Faezov commented Mar 30, 2023

python -c 'import nglview; print(nglview.__version__)'
3.0.3

python -c 'import ipywidgets; print(ipywidgets.__version__)'
8.0.6

AttributeError Traceback (most recent call last)
Cell In[2], line 3
1 import pymol
2 from pymol import cmd
----> 3 import nglview as nv
4 import requests

File ~/anaconda3/envs/pymol_jupyter/lib/python3.9/site-packages/nglview/init.py:4
1 import warnings
3 # for doc
----> 4 from . import adaptor, datafiles, show, widget
5 from ._version import get_versions
6 from .adaptor import *

File ~/anaconda3/envs/pymol_jupyter/lib/python3.9/site-packages/nglview/show.py:13
3 from . import datafiles
4 from .adaptor import (ASEStructure, ASETrajectory, BiopythonStructure,
5 FileStructure, HTMDTrajectory, IODataStructure,
6 IOTBXStructure, MDAnalysisTrajectory, MDTrajTrajectory,
(...)
11 RdkitStructure,
12 TextStructure)
---> 13 from .widget import NGLWidget
15 all = [
16 'demo',
17 'show_pdbid',
(...)
40 'show_biopython',
41 ]
44 def show_pdbid(pdbid, **kwargs):

File ~/anaconda3/envs/pymol_jupyter/lib/python3.9/site-packages/nglview/widget.py:19
15 from traitlets import (Bool, CaselessStrEnum, Dict, Instance, Int, Integer,
16 List, Unicode, observe, validate)
17 import traitlets
---> 19 from . import color, interpolate
20 from .adaptor import Structure, Trajectory
21 from .component import ComponentViewer

File ~/anaconda3/envs/pymol_jupyter/lib/python3.9/site-packages/nglview/color.py:114
110 else:
111 raise ValueError(f"{obj} must be either list of list or string")
--> 114 ColormakerRegistry = _ColormakerRegistry()

File ~/anaconda3/envs/pymol_jupyter/lib/python3.9/site-packages/nglview/base.py:10, in _singleton..getinstance()
8 def getinstance():
9 if cls not in instances:
---> 10 instances[cls] = cls()
11 return instances[cls]

File ~/anaconda3/envs/pymol_jupyter/lib/python3.9/site-packages/nglview/color.py:47, in _ColormakerRegistry.init(self, *args, **kwargs)
45 try:
46 get_ipython() # only display in notebook
---> 47 self.ipython_display()
48 except NameError:
49 pass

File ~/anaconda3/envs/pymol_jupyter/lib/python3.9/site-packages/nglview/color.py:54, in _ColormakerRegistry.ipython_display(self, **kwargs)
52 if self._ready:
53 return
---> 54 super().ipython_display(**kwargs)

AttributeError: 'super' object has no attribute 'ipython_display'

@hainm
Copy link
Collaborator

hainm commented Mar 30, 2023

please either:

  • downgrade your ipywidgets from 8 to 7
  • install nglview from master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants