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

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

Open
wook2014 opened this issue Dec 23, 2023 · 0 comments
Open

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

wook2014 opened this issue Dec 23, 2023 · 0 comments

Comments

@wook2014
Copy link

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.

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

1 participant