当前位置:   article > 正文

解决paddleocr安装时报错 Building wheel for fasttext (setup.py) ... error.....

building wheel for fasttext (setup.py) ... error

报错详情:

 Building wheel for fasttext (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      D:\python\lib\site-packages\setuptools\dist.py:742: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        % (opt, underscore_opt)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\fasttext
      copying python\fasttext_module\fasttext\FastText.py -> build\lib.win-amd64-3.7\fasttext
      copying python\fasttext_module\fasttext\__init__.py -> build\lib.win-amd64-3.7\fasttext
      creating build\lib.win-amd64-3.7\fasttext\util
      copying python\fasttext_module\fasttext\util\util.py -> build\lib.win-amd64-3.7\fasttext\util
      copying python\fasttext_module\fasttext\util\__init__.py -> build\lib.win-amd64-3.7\fasttext\util
      creating build\lib.win-amd64-3.7\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_configurations.py -> build\lib.win-amd64-3.7\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_script.py -> build\lib.win-amd64-3.7\fasttext\tests
      copying python\fasttext_module\fasttext\tests\__init__.py -> build\lib.win-amd64-3.7\fasttext\tests
      running build_ext
      building 'fasttext_pybind' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fasttext
  Running setup.py clean for fasttext
Failed to build fasttext
WARNING: Ignoring invalid distribution -ip (d:\python\lib\site-packages)
Installing collected packages: fasttext, paddleocr
  Running setup.py install for fasttext ... error
  error: subprocess-exited-with-error

  × Running setup.py install for fasttext did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      D:\python\lib\site-packages\setuptools\dist.py:742: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        % (opt, underscore_opt)
      running install
      D:\python\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\fasttext
      copying python\fasttext_module\fasttext\FastText.py -> build\lib.win-amd64-3.7\fasttext
      copying python\fasttext_module\fasttext\__init__.py -> build\lib.win-amd64-3.7\fasttext
      creating build\lib.win-amd64-3.7\fasttext\util
      copying python\fasttext_module\fasttext\util\util.py -> build\lib.win-amd64-3.7\fasttext\util
      copying python\fasttext_module\fasttext\util\__init__.py -> build\lib.win-amd64-3.7\fasttext\util
      creating build\lib.win-amd64-3.7\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_configurations.py -> build\lib.win-amd64-3.7\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_script.py -> build\lib.win-amd64-3.7\fasttext\tests
      copying python\fasttext_module\fasttext\tests\__init__.py -> build\lib.win-amd64-3.7\fasttext\tests
      running build_ext
      building 'fasttext_pybind' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> fasttext

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -ip (d:\python\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (d:\python\lib\site-packages)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74

错误原因:这是因为未安装Microsoft Visual C++ 14.0,安装方法见知乎:
点击跳转安装方法

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/47237?site
推荐阅读
相关标签
  

闽ICP备14008679号