I want to download spacy, but the version of typing-extensions is lowered in the terminal:
我想下载Spacy,但终端的打字扩展版本降低了:
ERROR: pydantic 2.3.0 has requirement typing-extensions>=4.6.1, but you'll have typing-extensions 4.4.0 which is incompatible.
ERROR: pydantic-core 2.6.3 has requirement typing-extensions!=4.7.0,>=4.6.0, but you'll have typing-extensions 4.4.0 which is incompatible.
Installing collected packages: typing-extensions
Attempting uninstall: typing-extensions
Found existing installation: typing-extensions 4.7.1
Uninstalling typing-extensions-4.7.1:
Successfully uninstalled typing-extensions-4.7.1
Successfully installed typing-extensions-4.4.0
Next I want to install the language pack python -m spacy download en
, but another error occurs:
接下来,我想安装语言包python-m spacy Download en,但出现另一个错误:
(base) E:\Anaconda>python -m spacy download en
Traceback (most recent call last):
File "E:\Anaconda\lib\site-packages\confection\__init__.py", line 38, in <module>
from pydantic.v1 import BaseModel, Extra, ValidationError, create_model
File "E:\Anaconda\lib\site-packages\pydantic\__init__.py", line 13, in <module>
from . import dataclasses
File "E:\Anaconda\lib\site-packages\pydantic\dataclasses.py", line 11, in <module>
from ._internal import _config, _decorators, _typing_extra
File "E:\Anaconda\lib\site-packages\pydantic\_internal\_config.py", line 9, in <module>
from ..config import ConfigDict, ExtraValues, JsonEncoder, JsonSchemaExtraCallable
File "E:\Anaconda\lib\site-packages\pydantic\config.py", line 9, in <module>
from .deprecated.config import BaseConfig
File "E:\Anaconda\lib\site-packages\pydantic\deprecated\config.py", line 6, in <module>
from typing_extensions import Literal, deprecated
ImportError: cannot import name 'deprecated' from 'typing_extensions' (E:\Anaconda\lib\site-packages\typing_extensions.py)
My current python version is 3.7, should I update it? Or is there any better solution? I'm a newbie in this area, thank you all!
我当前的python版本是3.7,我应该更新它吗?或者还有更好的解决方案吗?我是这个领域的新手,谢谢大家!
更多回答
优秀答案推荐
You should use typing_extensions==4.7.1
您应该使用TYPING_EXTENSIONS==4.7.1
try :
尝试:
pip install typing_extensions==4.7.1 --upgrade
I also suggest you to upgrade your python version from 3.7
to 3.10
or 3.11
我还建议您将您的Python版本从3.7升级到3.10或3.11
See a relevant answer:
请参阅相关答案:
https://github.com/tiangolo/fastapi/discussions/9808
Https://github.com/tiangolo/fastapi/discussions/9808
更多回答
I really appreciate your advice; it has been very helpful for me.
我真的很感谢你的建议,它对我很有帮助。
我是一名优秀的程序员,十分优秀!