как установить hmmlearn lib, если он выдает ошибку "--single-version-externally-managed --compile" - PullRequest
0 голосов
/ 15 января 2020

Я пытаюсь установить hmmlearn lib для использования в другой lib. Я посмотрел на похожие вопросы, попробовал то, что они советуют:

pip install -U setuptools
pip install -U wheel

Но это все равно не сработало.

pip install hmmlearn
Collecting hmmlearn
  Using cached https://files.pythonhosted.org/packages/c3/74/baa2eb03c3d2a0e8efcfcf5b4549f762e7ef804cb4f87a653c452dcd57d9/hmmlearn-0.2.3.tar.gz
Requirement already satisfied: numpy>=1.10 in c:\python3\lib\site-packages (from hmmlearn) (1.16.3)
Requirement already satisfied: scikit-learn>=0.16 in c:\python3\lib\site-packages (from hmmlearn) (0.22.1)
Requirement already satisfied: scipy>=0.15 in c:\python3\lib\site-packages (from hmmlearn) (1.3.1)
Requirement already satisfied: joblib>=0.11 in c:\python3\lib\site-packages (from scikit-learn>=0.16->hmmlearn) (0.14.0)
Building wheels for collected packages: hmmlearn
  Building wheel for hmmlearn (setup.py): started
  Building wheel for hmmlearn (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: 'c:\python3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\erjan222\\AppData\\Local\\Temp\\pip-install-2c2del6a\\hmmlearn\\setup.py'"'"'; __file__='"'"'C:\\Users\\erjan222\\AppData\\Local\\Temp\\pip-install-2c2del6a\\hmmlearn\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\erjan222\AppData\Local\Temp\pip-wheel-p0ayunr7' --python-tag cp37
       cwd: C:\Users\erjan222\AppData\Local\Temp\pip-install-2c2del6a\hmmlearn\
  Complete output (58 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.7
  creating build\lib.win32-3.7\hmmlearn
  copying lib\hmmlearn\base.py -> build\lib.win32-3.7\hmmlearn
  copying lib\hmmlearn\hmm.py -> build\lib.win32-3.7\hmmlearn
  copying lib\hmmlearn\stats.py -> build\lib.win32-3.7\hmmlearn
  copying lib\hmmlearn\utils.py -> build\lib.win32-3.7\hmmlearn
  copying lib\hmmlearn\_utils.py -> build\lib.win32-3.7\hmmlearn
  copying lib\hmmlearn\_version.py -> build\lib.win32-3.7\hmmlearn
  copying lib\hmmlearn\__init__.py -> build\lib.win32-3.7\hmmlearn
  creating build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\conftest.py -> build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\test_base.py -> build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\test_gaussian_hmm.py -> build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\test_gmm_hmm.py -> build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\test_gmm_hmm_new.py -> build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\test_multinomial_hmm.py -> build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\test_utils.py -> build\lib.win32-3.7\hmmlearn\tests
  copying lib\hmmlearn\tests\__init__.py -> build\lib.win32-3.7\hmmlearn\tests
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\erjan222\AppData\Local\Temp\pip-install-2c2del6a\hmmlearn\setup.py", line 98, in <module>
      "gui_scripts": [],
    File "c:\python3\lib\site-packages\setuptools\__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "c:\python3\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "c:\python3\lib\distutils\dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "c:\python3\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "c:\python3\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
      self.run_command('build')
    File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\python3\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "c:\python3\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\python3\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "c:\python3\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
      _build_ext.run(self)
    File "c:\python3\lib\distutils\command\build_ext.py", line 308, in run
      force=self.force)
    File "c:\python3\lib\site-packages\numpy\distutils\ccompiler.py", line 765,in new_compiler
      compiler = klass(None, dry_run, force)
    File "c:\python3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 69, in __init__
      dry_run, force)
    File "c:\python3\lib\distutils\cygwinccompiler.py", line 126, in __init__
      if self.ld_version >= "2.10.90":
  TypeError: '>=' not supported between instances of 'NoneType' and 'str'
  ----------------------------------------
  ERROR: Failed building wheel for hmmlearn
  Running setup.py clean for hmmlearn
Failed to build hmmlearn
Installing collected packages: hmmlearn
    Running setup.py install for hmmlearn: started
    Running setup.py install for hmmlearn: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: 'c:\python3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\erjan222\\AppData\\Local\\Temp\\pip-install-2c2del6a\\hmmlearn\\setup.py'"'"'; __file__='"'"'C:\\Users\\erjan222\\AppData\\Local\\Temp\\pip-install-2c2del6a\\hmmlearn\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\erjan222\AppData\Local\Temp\pip-record-66k5td32\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\erjan222\AppData\Local\Temp\pip-install-2c2del6a\hmmlearn\
    Complete output (60 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\hmmlearn
    copying lib\hmmlearn\base.py -> build\lib.win32-3.7\hmmlearn
    copying lib\hmmlearn\hmm.py -> build\lib.win32-3.7\hmmlearn
    copying lib\hmmlearn\stats.py -> build\lib.win32-3.7\hmmlearn
    copying lib\hmmlearn\utils.py -> build\lib.win32-3.7\hmmlearn
    copying lib\hmmlearn\_utils.py -> build\lib.win32-3.7\hmmlearn
    copying lib\hmmlearn\_version.py -> build\lib.win32-3.7\hmmlearn
    copying lib\hmmlearn\__init__.py -> build\lib.win32-3.7\hmmlearn
    creating build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\conftest.py -> build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\test_base.py -> build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\test_gaussian_hmm.py -> build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\test_gmm_hmm.py -> build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\test_gmm_hmm_new.py -> build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\test_multinomial_hmm.py -> build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\test_utils.py -> build\lib.win32-3.7\hmmlearn\tests
    copying lib\hmmlearn\tests\__init__.py -> build\lib.win32-3.7\hmmlearn\tests
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\erjan222\AppData\Local\Temp\pip-install-2c2del6a\hmmlearn\setup.py", line 98, in <module>
        "gui_scripts": [],
      File "c:\python3\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\python3\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\python3\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\python3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\python3\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\python3\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\python3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\python3\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\python3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\python3\lib\site-packages\setuptools\command\build_ext.py", line84, in run
        _build_ext.run(self)
      File "c:\python3\lib\distutils\command\build_ext.py", line 308, in run
        force=self.force)
      File "c:\python3\lib\site-packages\numpy\distutils\ccompiler.py", line 765, in new_compiler
        compiler = klass(None, dry_run, force)
      File "c:\python3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 69, in __init__
        dry_run, force)
      File "c:\python3\lib\distutils\cygwinccompiler.py", line 126, in __init__
        if self.ld_version >= "2.10.90":
    TypeError: '>=' not supported between instances of 'NoneType' and 'str'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = 

'"'"'C:\\Users\\erjan222\\AppData\\Local\\Temp\\pip-install-2c2del6a\\hmmlearn\\setup.py'"'"'; 
__file__='"'"'C:\\Users\\erjan222\\AppData\\Local\\Temp\\pip-install-2c2del6a\\hmmlearn\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 

'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'

 install --record 'C:\Users\erjan222\AppData\Local\Temp\pip-record-
66k5td32\install-record.txt'

 --single-version-externally-managed --compile Check the logs for full command output.
...