Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help
#1
I'm new to coding & scripting etc, can someone please tell me how to install this https://pypi.org/project/videocr/
I have installed latest python, then I keep getting error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/, I don't know how to download it & install? can someone please help me?
Reply
#2
How to install PIP packages.
1. Type Command Prompt in the Windows search box.
2. Then ight click on the Windows Command Prompt. Then, select Run as administrator (by running the Command Prompt as an administrator, you’ll avoid any permission issues.
3. In the Command Prompt, type “cd\” as this command will ensure that your starting point has only the drive name.
4. Locate your Python Scripts path. The Scripts folder can be found within the Python application folder, where you originally installed.
example: Python.C:\Users\DT2000\AppData\Local\Programs\Python\Python37-32\Scripts
5. In the Command Prompt, type cd followed by your Python Scripts path.
6. At the command prompt example: C:\> cd C:\Users\DT2000\AppData\Local\Programs\Python\Python37-32\Scripts
7. Now, type the pip install command to install your Python package. The pip install command has the following structure.
pip install videocr
8. Press Enter, and you’ll notice that the package will be installed.

Hope this offers some help.
Reply
#3
Install Python-Levenshtein wheel from gohlke.
Eg if use python 3.8
(my_env) G:\code\my_env
λ pip install python_Levenshtein-0.12.0-cp38-cp38-win_amd64.whl
Processing g:\code\my_env\python_levenshtein-0.12.0-cp38-cp38-win_amd64.whl
Installing collected packages: python-Levenshtein
Successfully installed python-Levenshtein-0.12.0
Now install again.
(my_env) G:\code\my_env
λ pip install videocr
Collecting videocr .....  
Successfully installed Pillow-8.0.1 numpy-1.19.4 opencv-python-4.4.0.46 pytesseract-0.3.6 videocr-0.1.6 
Test that it works.
(my_env) G:\code\my_env
λ python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from videocr import get_subtitles
 ** On entry to DGEBAL parameter number  3 had an illegal value
Traceback (most recent call last): .....
 RuntimeError: The current Numpy installation ('G:\\code\\my_env\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86
Fix use a earlier Numpy version that has OpenBLAS 0.3.12.
(my_env) G:\code\my_env
λ pip install numpy==1.19.3
Collecting numpy==1.19.3 
  Downloading .....     
Successfully installed numpy-1.19.3
Testa again,ok now.
(my_env) G:\code\my_env
λ python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from videocr import get_subtitles
>>>
>>> exit()
Reply
#4
but still I keep getting error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/, I don't know how to download it & install? can someone please help me?
Reply
#5
There's a download button for the build tools on that page, in the "Tools for Visual Studio 2019" section a bit down the page.
Reply
#6
(Nov-22-2020, 12:53 PM)Yui_18 Wrote: can someone please help me?
That's what i have done Dodgy
You most follow what i have done,Python-Levenshtein(a requirement for this package) give the Microsoft Visual C++ 14.0 error.
Using/setup Visual C++ compiler can be difficult on Windows,that's why use wheel from Gohlke.

So you download wheel for your Python version from Python-Levenshtein
Then use pip to install it,example if you have Python 3.9 64-bit version.
pip install python_Levenshtein‑0.12.0‑cp39‑cp39‑win_amd64.whl
Continue with next steps.
Reply
#7
I have downloaded python_Levenshtein-0.12.0-cp39-cp39-win_amd64.whl into D:\, but now getting "looks like a filename, but the file does not exist
ERROR: python_Levenshtein-0.12.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform."
How to redirect pip to D: to run it?
Reply
#8
Yui_18 Wrote:python_Levenshtein-0.12.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform."
Most download right version for you python version.
Type python in cmd.
C:\>python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

C:\>
So here you see that i use python 3.8 64-bit version then i need to use this version.
pip install python_Levenshtein-0.12.0-cp38-cp38-win_amd64.whl

This tell [MSC v.1924 64 bit (AMD64)] if it's 32-bit og 64-bit of Python.
The version is explanatory as it show Python 3.8.
Reply
#9
Here's my data
"Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>"
Reply
#10
This is what I got, should have I opened pip with administrator privilage?

C:\Users\Admin>pip install tesseract-ocr
Collecting tesseract-ocr
Using cached tesseract-ocr-0.0.1.tar.gz (33 kB)
Requirement already satisfied: cython in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (from tesseract-ocr) (0.29.21)
Building wheels for collected packages: tesseract-ocr
Building wheel for tesseract-ocr (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-7z6kxlsq\\tesseract-ocr\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-7z6kxlsq\\tesseract-ocr\\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\Admin\AppData\Local\Temp\pip-wheel-l1mcr21b'
cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-7z6kxlsq\tesseract-ocr\
Complete output (14 lines):
running bdist_wheel
running build
running build_py
file tesseract_ocr.py (for module tesseract_ocr) not found
file tesseract_ocr.py (for module tesseract_ocr) not found
running build_ext
building 'tesseract_ocr' extension
creating build
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\admin\appdata\local\programs\python\python39\include -Ic:\users\admin\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include /EHsc /Tptesseract_ocr.cpp /Fobuild\temp.win-amd64-3.9\Release\tesseract_ocr.obj
tesseract_ocr.cpp
c:\users\admin\appdata\local\programs\python\python39\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for tesseract-ocr
Running setup.py clean for tesseract-ocr
Failed to build tesseract-ocr
Installing collected packages: tesseract-ocr
Running setup.py install for tesseract-ocr ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-7z6kxlsq\\tesseract-ocr\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-7z6kxlsq\\tesseract-ocr\\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\Admin\AppData\Local\Temp\pip-record-tz9b7mvh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\appdata\local\programs\python\python39\Include\tesseract-ocr'
cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-7z6kxlsq\tesseract-ocr\
Complete output (14 lines):
running install
running build
running build_py
file tesseract_ocr.py (for module tesseract_ocr) not found
file tesseract_ocr.py (for module tesseract_ocr) not found
running build_ext
building 'tesseract_ocr' extension
creating build
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\admin\appdata\local\programs\python\python39\include -Ic:\users\admin\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include /EHsc /Tptesseract_ocr.cpp /Fobuild\temp.win-amd64-3.9\Release\tesseract_ocr.obj
tesseract_ocr.cpp
c:\users\admin\appdata\local\programs\python\python39\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\admin\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-7z6kxlsq\\tesseract-ocr\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-7z6kxlsq\\tesseract-ocr\\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\Admin\AppData\Local\Temp\pip-record-tz9b7mvh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\appdata\local\programs\python\python39\Include\tesseract-ocr' Check the logs for full command output.

C:\Users\Admin>
C:\Users\Admin>
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020