We Are Going To Discuss About AttributeError: module ‘collections’ has no attribute ‘MutableMapping’. So lets Start this Python Article.
AttributeError: module ‘collections’ has no attribute ‘MutableMapping’
- How to solve AttributeError: module 'collections' has no attribute 'MutableMapping'
There are some Libraries aren't fully compatible with
3.10
to the time pf writing this answer
You can downgrade to3.8
or3.9
for now and it will work seamlessly
you can find all version for python here
choose your most suitable version - AttributeError: module 'collections' has no attribute 'MutableMapping'
There are some Libraries aren't fully compatible with
3.10
to the time pf writing this answer
You can downgrade to3.8
or3.9
for now and it will work seamlessly
you can find all version for python here
choose your most suitable version
Solution 1
There are some Libraries aren’t fully compatible with 3.10
to the time pf writing this answer
You can downgrade to 3.8
or 3.9
for now and it will work seamlessly
you can find all version for python here
choose your most suitable version
Original Author Mohamed Arafa Of This Content
Solution 2
The question already seems to have a solution but for better understanding of the problem, in python 3.10, the attribute MutableMapping
from the module collections
have been removed.
In your case, /usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/_vendor/pyparsing.py
uses the MutableMapping attribute of collections.
As a backward compatibility, the attribute has been moved to collections.abc
.
So a dirty hack would be to replace all collections.MutableMapping
to collections.abc.MutableMapping
An example :
import collections
if sys.version_info.major == 3 and sys.version_info.minor >= 10
from collections.abc import MutableMapping
else
from collections import MutableMapping
Original Author Just Khaithang Of This Content
Solution 3
just update requests library version to 2.27.1
use :
sudo apt-get install python-requests==2.27.1
Original Author Amir Of This Content
Solution 4
In my case, upgrading the following packages worked on Windows 11:
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade setuptools
pip install --upgrade requests
I hope this helps
Original Author Kloniphani Maxakadzi Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.