简体   繁体   中英

Very weird error in chess __init__.py file

I import chess in python and I finished everything in the project but when I click run I find a very weird error in file __init__.py

the error

File "D:\pythonProject\pythonProject3\venv\lib\site-packages\chess\__init__.py", line 37, in <module>
    from typing import ClassVar, Callable, Counter, Dict, Generic, Hashable, Iterable, Iterator, List, Mapping, Optional, SupportsInt, Tuple, Type, TypeVar, Union
ImportError: cannot import name 'Counter'

i found out that i need to use a higher version of python i was using python 3.6 and i started using higher version of python like 3.10 and it is working perfectly now

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM