简体   繁体   中英

ujson behaving weirdly during the installation of spacy_readability

I've had difficulty installing spacy_readability which seems to be caused by an old version of ujson. So I have installed the latest version of ujson:

!pip install --upgrade ujson --user
Requirement already satisfied: ujson in c:\users\desktop pc\appdata\roaming\python\python38\site-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

I don't think the error is relevant because, I am not using syllapy, but perhaps i am mistaken. Then i have attempted spacey_readability

!pip install spacy_readability --user   

Requirement already satisfied: spacy_readability in c:\users\desktop pc\appdata\roaming\python\python38\site-packages (1.4.1)
Requirement already satisfied: syllapy<1,>=0 in c:\users\desktop pc\appdata\roaming\python\python38\site-packages (from spacy_readability) (0.7.1)
Requirement already satisfied: spacy<3.0,>=2.0 in c:\programdata\anaconda3\lib\site-packages (from spacy_readability) (2.2.3)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (1.0.6)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (3.0.6)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (2.0.6)
Requirement already satisfied: blis<0.5.0,>=0.4.0 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (0.4.1)
Requirement already satisfied: srsly<1.1.0,>=0.1.0 in c:\users\desktop pc\appdata\roaming\python\python38\site-packages (from spacy<3.0,>=2.0->spacy_readability) (1.0.5)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\lib\site-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:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (2.25.1)
Requirement already satisfied: numpy>=1.15.0 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (1.20.1)
Requirement already satisfied: thinc<7.4.0,>=7.3.0 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (7.3.1)
Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in c:\users\desktop pc\appdata\roaming\python\python38\site-packages (from spacy<3.0,>=2.0->spacy_readability) (1.0.0)
Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (0.9.0)
Requirement already satisfied: plac<1.2.0,>=0.9.6 in c:\programdata\anaconda3\lib\site-packages (from spacy<3.0,>=2.0->spacy_readability) (1.1.3)
Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\lib\site-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:\programdata\anaconda3\lib\site-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:\programdata\anaconda3\lib\site-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:\programdata\anaconda3\lib\site-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:\programdata\anaconda3\lib\site-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.

I find this output very confusing. It seems to be detecting ujson 1.35 then replacing the more recent version of it with this, noticing that it is not recent enough and then causing an error. How do I avoid this?

You can make pip not check dependencies using pip install --no-deps [whatever] .

Note that spaCy readability has not been updated since 2019, so you might be better off reimplementing things yourself.

https://github.com/mholtzscher/spacy_readability

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