简体   繁体   中英

pip install tesserocr on windows 10 gives error

I am trying to install tesserocr package for python on Windows10 host OS i am getting following error

 pip install tesserocr

execution

 pip install tesserocr
Collecting tesserocr
  Using cached tesserocr-2.1.3.tar.gz
Building wheels for collected packages: tesserocr
  Running setup.py bdist_wheel for tesserocr ... error
  Complete output from command "C:\Program Files\Anaconda3\python.exe" -u -c 
"import setuptools, 
tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-build-
klj3zdup\\tesserocr\\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\hp\AppData\Local\Temp\tmpoyt9eh40pip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_ext
  Failed to extract tesseract version from executable: [WinError 2] The 
system cannot find the file specified
  Supporting tesseract v3.04.00
  Building with configs: {'libraries': ['tesseract', 'lept'], 
'cython_compile_time_env': {'TESSERACT_VERSION': 197632}}
  cythoning tesserocr.pyx to tesserocr.cpp
  building 'tesserocr' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft 
Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-
build-tools

  ----------------------------------------
  Failed building wheel for tesserocr
  Running setup.py clean for tesserocr
Failed to build tesserocr
Installing collected packages: tesserocr
  Running setup.py install for tesserocr ... error
    Complete output from command "C:\Program Files\Anaconda3\python.exe" -u 
-c "import setuptools, 
tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-build-
klj3zdup\\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 C:\Users\hp\AppData\Local\Temp\pip-
10ema0ny-record\install-record.txt --single-version-externally-managed --
compile:
running install
running build
running build_ext
Failed to extract tesseract version from executable: [WinError 2] The system cannot find the file specified
Supporting tesseract v3.04.00
Building with configs: {'cython_compile_time_env': {'TESSERACT_VERSION': 197632}, 'libraries': ['tesseract', 'lept']}
skipping 'tesserocr.cpp' Cython extension (up-to-date)
building 'tesserocr' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

----------------------------------------
Command ""C:\Program Files\Anaconda3\python.exe" -u -c "import setuptools, 
tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-build-
klj3zdup\\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 C:\Users\hp\AppData\Local\Temp\pip-
10ema0ny-record\install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in C:\Users\hp\AppData\Local\Temp\pip-
build-klj3zdup\tesserocr\

how to overcome this isuue?

As you can see from the error log, the problem here is that on your machine is missing Microsoft Visual C++ 14.0 .

To fix this problem, simply install it, follow the link that you find in the traceback ( this one ), and try again with the command

pip install tesserocr

直接使用Anaconda重新加载Python并使用:

conda install -c simonflueckiger tesserocr

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