Running setup.py install for tesserocr … error

huangapple go评论102阅读模式
英文:

Running setup.py install for tesserocr ... error

问题

每当我输入以下命令时 -

  1. pip3 install tesserocr -

它会出现错误 -

  1. Collecting tesserocr
  2. Using cached https://files.pythonhosted.org/packages/e3/77/fb26b321c3b9ce4a47af12b19e85ddbf4d0629adb6552d85276e824e6e51/tesserocr-2.5.0.tar.gz
  3. Building wheels for collected packages: tesserocr
  4. Building wheel for tesserocr (setup.py) ... error
  5. tesserocr.cpp:8586:43: error: class tesseract::ResultIterator has no member named GetBestLSTMSymbolChoices
  6. __pyx_v_output = (__pyx_v_self-> _riter-> GetBestLSTMSymbolChoices()[0]);
  7. ^~~~~~~~~~~~~~~~~~~~~~~~
  8. error: command x86_64-linux-gnu-gcc failed with exit status 1
  9. ----------------------------------------
  10. ERROR: Failed building wheel for tesserocr
  11. Running setup.py clean for tesserocr
  12. Failed to build tesserocr
  13. Installing collected packages: tesserocr
  14. Running setup.py install for tesserocr ... error
  15. ERROR: Command errored out with exit status 1:
  16. command: /home/hostbooks/django1/myproject/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = """""""/tmp/pip-install-7nxw40tx/tesserocr/setup.py"""""""; __file__="""""""/tmp/pip-install-7nxw40tx/tesserocr/setup.py""""""";f=getattr(tokenize, """""""open""""""", open)(__file__);code=f.read().replace("""""""\r\n""""""", """""""\n""""""");f.close();exec(compile(code, __file__, """""""exec"""""""))' install --record /tmp/pip-record-p51ckvh8/install-record.txt --single-version-externally-managed --compile --install-headers /home/hostbooks/django1/myproject/include/site/python3.6/tesserocr
  17. cwd: /tmp/pip-install-7nxw40tx/tesserocr/
  18. Complete output (14 lines):
  19. Supporting tesseract v4.0.0
  20. Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 67108864}}
  21. running install
  22. running build
  23. running build_ext
  24. building 'tesserocr' extension
  25. creating build
  26. creating build/temp.linux-x86_64-3.6
  27. x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/hostbooks/django1/myproject/include/python3.6m -c tesserocr.cpp -o build/temp.linux-x86_64-3.6/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
  28. tesserocr.cpp: In function PyObject* __pyx_pf_9tesserocr_16PyResultIterator_8GetBestLSTMSymbolChoices(__pyx_obj_9tesserocr_PyResultIterator*)’:
  29. tesserocr.cpp:8586:43: error: class tesseract::ResultIterator has no member named GetBestLSTMSymbolChoices
  30. __pyx_v_output = (__pyx_v_self-> _riter-> GetBestLSTMSymbolChoices()[0]);
  31. ^~~~~~~~~~~~~~~~~~~~~~~~
  32. error: command x86_64-linux-gnu-gcc failed with exit status 1
  33. ----------------------------------------
  34. ERROR: Command errored out with exit status 1: /home/hostbooks/django1/myproject/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = """""""/tmp/pip-install-7nxw40tx/tesserocr/setup.py"""""""; __file__="""""""/tmp/pip-install-7nxw40tx/tesserocr/setup.py""""""";f=getattr(tokenize, """""""open""""""", open)(__file__);code=f.read().replace("""""""\r\n""""""", """""""\n""""""");f.close();exec(compile(code, __file__, """""""exec"""""""))' install --record /tmp/pip-record-p51ckvh8/install-record.txt --single-version-externally-managed --compile --install-headers /home/hostbooks/django1/myproject/include/site/python3.6/tesserocr Check the logs for full command output.
  35. 如何解决这个错误。
  36. 我的虚拟环境名称是 - myproject
  37. <details>
  38. <summary>英文:</summary>
  39. When ever I enter for command -
  40. pip3 install tesserocr -
  41. It gives error -
  42. Collecting tesserocr
  43. Using cached https://files.pythonhosted.org/packages/e3/77/fb26b321c3b9ce4a47af12b19e85ddbf4d0629adb6552d85276e824e6e51/tesserocr-2.5.0.tar.gz
  44. Building wheels for collected packages: tesserocr
  45. Building wheel for tesserocr (setup.py) ... error
  46. tesserocr.cpp:8586:43: error: class tesseract::ResultIterator has no member named GetBestLSTMSymbolChoices
  47. __pyx_v_output = (__pyx_v_self-&gt;_riter-&gt;GetBestLSTMSymbolChoices()[0]);
  48. ^~~~~~~~~~~~~~~~~~~~~~~~
  49. error: command &#39;x86_64-linux-gnu-gcc&#39; failed with exit status 1
  50. ----------------------------------------
  51. ERROR: Failed building wheel for tesserocr
  52. Running setup.py clean for tesserocr
  53. Failed to build tesserocr
  54. Installing collected packages: tesserocr
  55. Running setup.py install for tesserocr ... error
  56. ERROR: Command errored out with exit status 1:
  57. command: /home/hostbooks/django1/myproject/bin/python3 -u -c &#39;import sys, setuptools, tokenize; sys.argv[0] = &#39;&quot;&#39;&quot;&#39;/tmp/pip-install-7nxw40tx/tesserocr/setup.py&#39;&quot;&#39;&quot;&#39;; __file__=&#39;&quot;&#39;&quot;&#39;/tmp/pip-install-7nxw40tx/tesserocr/setup.py&#39;&quot;&#39;&quot;&#39;;f=getattr(tokenize, &#39;&quot;&#39;&quot;&#39;open&#39;&quot;&#39;&quot;&#39;, open)(__file__);code=f.read().replace(&#39;&quot;&#39;&quot;&#39;\r\n&#39;&quot;&#39;&quot;&#39;, &#39;&quot;&#39;&quot;&#39;\n&#39;&quot;&#39;&quot;&#39;);f.close();exec(compile(code, __file__, &#39;&quot;&#39;&quot;&#39;exec&#39;&quot;&#39;&quot;&#39;))&#39; install --record /tmp/pip-record-p51ckvh8/install-record.txt --single-version-externally-managed --compile --install-headers /home/hostbooks/django1/myproject/include/site/python3.6/tesserocr
  58. cwd: /tmp/pip-install-7nxw40tx/tesserocr/
  59. Complete output (14 lines):
  60. Supporting tesseract v4.0.0
  61. Building with configs: {&#39;libraries&#39;: [&#39;tesseract&#39;, &#39;lept&#39;], &#39;cython_compile_time_env&#39;: {&#39;TESSERACT_VERSION&#39;: 67108864}}
  62. running install
  63. running build
  64. running build_ext
  65. building &#39;tesserocr&#39; extension
  66. creating build
  67. creating build/temp.linux-x86_64-3.6
  68. x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/hostbooks/django1/myproject/include/python3.6m -c tesserocr.cpp -o build/temp.linux-x86_64-3.6/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
  69. tesserocr.cpp: In function PyObject* __pyx_pf_9tesserocr_16PyResultIterator_8GetBestLSTMSymbolChoices(__pyx_obj_9tesserocr_PyResultIterator*)’:
  70. tesserocr.cpp:8586:43: error: class tesseract::ResultIterator has no member named GetBestLSTMSymbolChoices
  71. __pyx_v_output = (__pyx_v_self-&gt;_riter-&gt;GetBestLSTMSymbolChoices()[0]);
  72. ^~~~~~~~~~~~~~~~~~~~~~~~
  73. error: command &#39;x86_64-linux-gnu-gcc&#39; failed with exit status 1
  74. ----------------------------------------
  75. ERROR: Command errored out with exit status 1: /home/hostbooks/django1/myproject/bin/python3 -u -c &#39;import sys, setuptools, tokenize; sys.argv[0] = &#39;&quot;&#39;&quot;&#39;/tmp/pip-install-7nxw40tx/tesserocr/setup.py&#39;&quot;&#39;&quot;&#39;; __file__=&#39;&quot;&#39;&quot;&#39;/tmp/pip-install-7nxw40tx/tesserocr/setup.py&#39;&quot;&#39;&quot;&#39;;f=getattr(tokenize, &#39;&quot;&#39;&quot;&#39;open&#39;&quot;&#39;&quot;&#39;, open)(__file__);code=f.read().replace(&#39;&quot;&#39;&quot;&#39;\r\n&#39;&quot;&#39;&quot;&#39;, &#39;&quot;&#39;&quot;&#39;\n&#39;&quot;&#39;&quot;&#39;);f.close();exec(compile(code, __file__, &#39;&quot;&#39;&quot;&#39;exec&#39;&quot;&#39;&quot;&#39;))&#39; install --record /tmp/pip-record-p51ckvh8/install-record.txt --single-version-externally-managed --compile --install-headers /home/hostbooks/django1/myproject/include/site/python3.6/tesserocr Check the logs for full command output.
  76. How should I remove this error.
  77. Name of my virtual environment is - myproject
  78. </details>
  79. # 答案1
  80. **得分**: 0
  81. 以下是已翻译的内容:
  82. 对我来说,以后这些命令用于解决错误 -
  83. pip3 install pytesseract
  84. apt install pkg-config
  85. sudo apt install pkg-config
  86. install - 成功安装 -
  87. Wand-0.5.7
  88. tesserocr-2.4.1
  89. tqdm-4.38.0
  90. sudo apt-get update
  91. 这些命令解决了我的错误。
  92. <details>
  93. <summary>英文:</summary>
  94. For me later on these command goes for the error -
  95. pip3 install pytesseract
  96. apt install pkg-config
  97. sudo apt install pkg-config
  98. install - Successfully installed -
  99. Wand-0.5.7
  100. tesserocr-2.4.1
  101. tqdm-4.38.0
  102. sudo apt-get update
  103. these command removed my error.
  104. </details>

huangapple
  • 本文由 发表于 2020年1月3日 20:00:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/59578278.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定