ImportError: cannot import name 'list' from 'typing' (C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\typing.py)
时间: 2023-09-25 20:08:12 浏览: 214
关于python中导入文件到list的问题
This error occurs when the Python code is trying to import the 'list' class from the 'typing' module, but it is unable to do so.
The most likely cause of this error is that the version of Python being used is too old and does not support this feature. The 'list' class was introduced in Python 3.5, so if you are using an older version of Python, you may encounter this error.
To resolve this error, you can try upgrading to a newer version of Python that supports the 'list' class. Alternatively, you can try using a different approach that does not require the 'list' class from the 'typing' module.
阅读全文