I want to download spacy, but the version of typing-extensions is lowered in the terminal:
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:
(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!
You should use 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
See a relevant answer: