ujson在安装spacyreadibility时表现怪异



我在安装spacy_recurity时遇到了困难,这似乎是由旧版本的ujson引起的。所以我安装了最新版本的ujson:

!pip install --upgrade ujson --user
Requirement already satisfied: ujson in c:usersdesktop pcappdataroamingpythonpython38site-packages (1.35)
Collecting ujson
Using cached ujson-5.1.0-cp38-cp38-win_amd64.whl (36 kB)
Installing collected packages: ujson
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
syllapy 0.7.1 requires ujson<2.0,>=1.35, but you have ujson 5.1.0 which is incompatible.
Attempting uninstall: ujson
Found existing installation: ujson 1.35
Uninstalling ujson-1.35:
Successfully uninstalled ujson-1.35
Successfully installed ujson-5.1.0

我不认为这个错误是相关的,因为我没有使用音节,但也许我错了。然后我尝试了太空可读性

!pip install spacy_readability --user   
Requirement already satisfied: spacy_readability in c:usersdesktop pcappdataroamingpythonpython38site-packages (1.4.1)
Requirement already satisfied: syllapy<1,>=0 in c:usersdesktop pcappdataroamingpythonpython38site-packages (from spacy_readability) (0.7.1)
Requirement already satisfied: spacy<3.0,>=2.0 in c:programdataanaconda3libsite-packages (from spacy_readability) (2.2.3)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (1.0.6)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (3.0.6)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (2.0.6)
Requirement already satisfied: blis<0.5.0,>=0.4.0 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (0.4.1)
Requirement already satisfied: srsly<1.1.0,>=0.1.0 in c:usersdesktop pcappdataroamingpythonpython38site-packages (from spacy<3.0,>=2.0->spacy_readability) (1.0.5)
Requirement already satisfied: setuptools in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (52.0.0.post20210125)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (2.25.1)
Requirement already satisfied: numpy>=1.15.0 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (1.20.1)
Requirement already satisfied: thinc<7.4.0,>=7.3.0 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (7.3.1)
Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in c:usersdesktop pcappdataroamingpythonpython38site-packages (from spacy<3.0,>=2.0->spacy_readability) (1.0.0)
Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (0.9.0)
Requirement already satisfied: plac<1.2.0,>=0.9.6 in c:programdataanaconda3libsite-packages (from spacy<3.0,>=2.0->spacy_readability) (1.1.3)
Requirement already satisfied: idna<3,>=2.5 in c:programdataanaconda3libsite-packages (from requests<3.0.0,>=2.13.0->spacy<3.0,>=2.0->spacy_readability) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:programdataanaconda3libsite-packages (from requests<3.0.0,>=2.13.0->spacy<3.0,>=2.0->spacy_readability) (1.26.4)
Requirement already satisfied: certifi>=2017.4.17 in c:programdataanaconda3libsite-packages (from requests<3.0.0,>=2.13.0->spacy<3.0,>=2.0->spacy_readability) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in c:programdataanaconda3libsite-packages (from requests<3.0.0,>=2.13.0->spacy<3.0,>=2.0->spacy_readability) (4.0.0)
Collecting ujson<2.0,>=1.35
Using cached ujson-1.35-cp38-cp38-win_amd64.whl
Requirement already satisfied: tqdm<5.0.0,>=4.10.0 in c:programdataanaconda3libsite-packages (from thinc<7.4.0,>=7.3.0->spacy<3.0,>=2.0->spacy_readability) (4.59.0)
Installing collected packages: ujson
Attempting uninstall: ujson
Found existing installation: ujson 5.1.0
Uninstalling ujson-5.1.0:
Successfully uninstalled ujson-5.1.0
Successfully installed ujson-1.35
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
python-language-server 0.36.2 requires ujson>=3.0.0; python_version > "3", but you have ujson 1.35 which is incompatible.
python-jsonrpc-server 0.4.0 requires ujson>=3.0.0, but you have ujson 1.35 which is incompatible.

我发现这个输出非常令人困惑。它似乎检测到了ujson 1.35,然后用它替换了它的最新版本,注意到它不够新,然后导致了一个错误。我该如何避免这种情况?

您可以使用pip install --no-deps [whatever]使pip不检查依赖关系。

请注意,spaCy的可读性自2019年以来一直没有更新,所以你最好自己重新实现。

https://github.com/mholtzscher/spacy_readability

相关内容

  • 没有找到相关文章

最新更新