SBRG / ssbio

A Python framework for structural systems biology
http://ssbio.readthedocs.io/en/latest/
MIT License
101 stars 28 forks source link

ImportError: cannot import name 'Mapping' from 'collections' #56

Open wook2014 opened 6 months ago

wook2014 commented 6 months ago

I installed ssbio with python 3.10 and ipywidgets 7.0.0, an error occured:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/wook/.local/lib/python3.10/site-packages/nglview/__init__.py", line 4, in <module>
    from . import adaptor, datafiles, show, widget
  File "/home/wook/.local/lib/python3.10/site-packages/nglview/show.py", line 13, in <module>
    from .widget import NGLWidget
  File "/home/wook/.local/lib/python3.10/site-packages/nglview/widget.py", line 8, in <module>
    import ipywidgets as widgets
  File "/home/wook/.local/lib/python3.10/site-packages/ipywidgets/__init__.py", line 25, in <module>
    from .widgets import *
  File "/home/wook/.local/lib/python3.10/site-packages/ipywidgets/widgets/__init__.py", line 20, in <module>
    from .widget_selection import RadioButtons, ToggleButtons, ToggleButtonsStyle, Dropdown, Select, SelectionSlider, SelectMultiple, SelectionRangeSlider
  File "/home/wook/.local/lib/python3.10/site-packages/ipywidgets/widgets/widget_selection.py", line 9, in <module>
    from collections import Mapping, Iterable
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

It seemed that the error caused by a change in "request" module which "mapping" cannot be directly called by "collections". It is necessary to update ipywidgets rely to a newer version.