установка pip для spacy в ноутбуке jupyter не удалась - PullRequest
0 голосов
/ 24 сентября 2019

Я попробовал следующее для установки различных пакетов через приглашение anaconda: spacy, fuzzywuzzy, levenshtein.

Ниже перечислены вещи, которые я уже пробовал:

Блокнот Jupyter:

!pip install spacy

CMD:

pip install spacy

Приглашение Anaconda:

conda install -c conda-forge/label/cf201901 spacy

Это то, что следует из установки ноутбука jupyter, а также установки cmd:

Collecting spacy
  Using cached https://files.pythonhosted.org/packages/58/f2/5a23bb7251988da474eec844b692760cb0a317912291afc77b516f399cff/spacy-2.1.8.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\lenovo\appdata\local\programs\python\python37-32\python.exe' 'c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-du1j0vhu\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0'
       cwd: None
  Complete output (31 lines):
  Traceback (most recent call last):
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\__main__.py", line 16, in <module>
      from pip._internal import main as _main  # isort:skip # noqa
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\__init__.py", line 40, in <module>
      from pip._internal.cli.autocompletion import autocomplete
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\cli\autocompletion.py", line 8, in <module>
      from pip._internal.cli.main_parser import create_main_parser
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\cli\main_parser.py", line 11, in <module>
      from pip._internal.commands import (
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\commands\__init__.py", line 6, in <module>
      from pip._internal.commands.completion import CompletionCommand
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\commands\completion.py", line 6, in <module>
      from pip._internal.cli.base_command import Command
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\cli\base_command.py", line 26, in <module>
      from pip._internal.index import PackageFinder
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\index.py", line 38, in <module>
      from pip._internal.wheel import Wheel
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\wheel.py", line 7, in <module>
      import compileall
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\compileall.py", line 20, in <module>
      from concurrent.futures import ProcessPoolExecutor
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\concurrent\futures\__init__.py", line 8, in <module>
      from concurrent.futures._base import (FIRST_COMPLETED,
    File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\concurrent\futures\_base.py", line 381
      raise exception_type, self._exception, self._traceback
                          ^
  SyntaxError: invalid syntax
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lenovo\appdata\local\programs\python\python37-32\python.exe' 'c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-du1j0vhu\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0' Check the logs for full command output.


As for the conda install, I get the following:
(base) C:\Users\Lenovo>conda install -c conda-forge/label/cf201901 spacy
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.

1 Ответ

0 голосов
/ 24 сентября 2019

Запустите приведенный ниже код в командной строке:

conda install -c conda-forge spacy
conda install -c conda-forge/label/gcc7 spacy
conda install -c conda-forge/label/cf201901 spacy 
...