python Import Warning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ is deprecated since Python 3.3, and in 3.10 it will stop working
Codes below:
from collections import Iterator
print(isinstance(iter([]), Iterator)) # True
# Console output:
# D:\Code_data\pycharm project\first test\08-iterable.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
# from collections import Iterator
# True
Although the results have come out, there has always been an annoying warning (using or importing the ABCs from ‘collections’ instead of from’ collections. ABC ‘is predicted since Python 3.3, and in 3.10 it will stop working), The solution is to change
from collections import iterator
to
from collections.abc import iterator
Read More:
- [Solved] Python 3.7 from collections import Iterable Error
- [Solved] python3.10 Error: cannot import name ‘Iterable‘ from ‘collections‘
- Python: How to Solve error While importing windpy
- Python environment error, bad interpreter: there is no file or directory
- [Solved] Python Error: “RuntimeError: ‘cryptography‘ package is required for sha256_password or caching_sha2_pas”
- [Solved] Windows Configurate Python Environment error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft
- Typeerror in Python regular expression: expected string or bytes like object
- [How to Solve] Python TypeError: ‘int‘ object is not subscriptable
- [Solved] python-sutime Error: the JSON object must be str, bytes or bytearray, not ‘java.lang.String‘
- [Solved] D2lzh_Pytorch Import error: importerror: DLL load failed while importing
- Python PIP TypeError: expected str, bytes or os.PathLike object, not int
- Python Error: Failed to establish a new connection: [Errno -2] Name or service not known
- How to Fix keyerror in Python dictionary lookup
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- [Solved] Numpy Load Error: DLL load failed while importing _multiarray_umath: Could not be found Module
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- [Solved] wxauto error: ImportError: DLL load failed while importing win32gui: Can’t find the specified program
- Python: How to Delete Empty Files or Folders in the Directory
- Opencv-python Install is Stuck Error: running setup.py bdist_wheel for opencv-python
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)