from pymongo import MongoClient
I use the mongoDB to store my data, python version 3.10 , mongoDB the latest. But I kept getting the error:
`from collections import MutableMapping, namedtuple ImportError: cannot import name 'MutableMapping' from 'collections'
I tried to add
from collections.abc import MutableMapping
But always not worked
I tried to update the python to the verion 3.11 by creating another virtual environment, it worked anyway.enter image description here
Then I exit the current working terminal in pycharm, and restart it. and switch to the new venvn virtual environment. But have to install packages again, like scrapy, pymongo, "pymongo[srv]" etc.