Click here to Skip to main content
15,844,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I work on python 3.10 i face error i can't solve it
when try to install new package xlwings with python pip
error i get

C:\Program Files\Python310>pip install xlwings
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python310\Scripts\pip.exe\", line 4, in <module>
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\", line 21, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\urllib3\", line 8, in <module>
    from .connectionpool import (
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\urllib3\", line 29, in <module>
    from .connection import (
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\urllib3\", line 39, in <module>
    from .util.ssl_ import (
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\urllib3\util\", line 3, in <module>
    from .connection import is_connection_dropped
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\urllib3\util\", line 3, in <module>
    from .wait import wait_for_read
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\urllib3\util\", line 1, in <module>
    from .selectors import (
  File "C:\Users\sobhy.mohamed\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\urllib3\util\", line 14, in <module>
    from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (C:\Program Files\Python310\lib\collections\

so how to solve this issue

What I have tried:

pip install xlwings
CHill60 1-Jul-22 6:03am    
The error is quite clear - Mapping in not in collections
ahmed_sa 1-Jul-22 6:05am    
thank you for reply
so what i do to solve issue please
im beginner on python
Richard MacCutchan 1-Jul-22 7:09am    
The error message suggests that Mapping is required by xlwings, but is not part of the Python libraries. Go to the xlwings website and check their documentation.
ahmed_sa 1-Jul-22 8:09am    
this error generated with every package i need to install with python
Richard MacCutchan 2-Jul-22 9:16am    
Well that suggests that there is something wrong with your Python installation.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900