Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help
#11
Then this is the command for you.
pip install python_Levenshtein‑0.12.0‑cp39‑cp39‑win_amd64.whl
You most be the same folder from cmd,when you do this command.
So is use dir most see the file,as demo under.
G:\code\my_env>dir
 Volume in drive G is Seagate Backup Plus Drive
 Volume Serial Number is E687-60FA

 Directory of G:\code\my_env

22.11.2020  12:46    <DIR>          .
22.11.2020  12:46    <DIR>          ..
22.11.2020  12:43    <DIR>          Include
22.11.2020  12:43    <DIR>          Lib
22.11.2020  12:46            81 806 python_Levenshtein-0.12.0-cp38-cp38-win_amd64.whl
22.11.2020  12:43                75 pyvenv.cfg
22.11.2020  12:55    <DIR>          Scripts
               2 File(s)         81 881 bytes
               5 Dir(s)  1 782 472 957 952 bytes free
Yui_18 Wrote:C:\Users\Admin>pip install tesseract-ocr
No need for this,just follow next step pip install videocr it will install pytesseract-0.3.6.
Reply
#12
I'm now getting
C:\Users\Admin>D:\scripts\pip install python_Levenshtein-0.12.0-cp39-cp39-win_amd64.whl
'D:\scripts\pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Admin>dir D:\scripts\

Directory of D:\scripts

11/22/2020 10:22 PM <DIR> .
11/22/2020 10:22 PM <DIR> ..
11/22/2020 06:58 PM 82,328 python_Levenshtein-0.12.0-cp39-cp39-win_amd64.whl\

C:\Users\Admin>pip install python_Levenshtein‑0.12.0‑cp39‑cp39‑win_amd64.whl
WARNING: Requirement 'python_Levenshtein‑0.12.0‑cp39‑cp39‑win_amd64.whl' looks like a filename, but the file does not exist
ERROR: python_Levenshtein‑0.12.0‑cp39‑cp39‑win_amd64.whl is not a valid wheel filename.


NOw what?
Reply
#13
(Nov-22-2020, 05:23 PM)Yui_18 Wrote: 'D:\scripts\pip' is not recognized as an internal or external command,
It's not D:\scripts\pip only pip.
You most navigate cd to D:\scripts first.
D:\scripts>pip install python_Levenshtein-0.12.0-cp39-cp39-win_amd64.whl
Then it will look like show over.
How to use the Windows command line
Reply
#14
now I'm getting
C:\>cd D:\scripts>pip install python_Levenshtein-0.12.0-cp39-cp39-win_amd64.whl
Access is denied.

Should I run pip as admin/system32?
Reply
#15
.................
Reply
#16
I successfully did it, thanks so much for guiding me through so far

Now what I want to do is, I want to OCR the hardsubbed file: "Bhakta Dhruva.mp4" which has english hard coded subtitles, in the folder "D:\Movies', ie; D:\Movies\Bhakta Dhruva.mp4 , but since I'm new to coding, unable to understand/confused on exactly what and how to do?
https://pypi.org/project/videocr/
Reply
#17
Use example.py most be in same folder as Bhakta Dhruva.mp4.
Run from command line(cmd) in folder with these files python example.py.
I guess it will take long time if movie is long,so i would test with a shorter movie first to see if this work.
# example.py

from videocr import get_subtitles

if __name__ == '__main__':  # This check is mandatory for Windows.
    print(get_subtitles('Bhakta Dhruva.mp4', lang='hin+eng', sim_threshold=70, conf_threshold=65))
Reply
#18
Now I'm getting
C:\Users\Admin>D:\movies\example.py
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "D:\movies\example.py", line 3, in <module>
from videocr import get_subtitles
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\__init__.py", line 2, in <module>
from .api import get_subtitles, save_subtitles_to_file
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\api.py", line 2, in <module>
from .video import Video
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\video.py", line 5, in <module>
import pytesseract
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\pytesseract\__init__.py", line 1, in <module>
from .pytesseract import ( # noqa: F401
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\pytesseract\pytesseract.py", line 31, in <module>
from numpy import ndarray
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
_win_os_check()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\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
Reply
#19
You have not followed all step in post #3.
pip install numpy==1.19.3
Reply
#20
Ok, installed numpy, now I'm getting
C:\Users\Admin>D:\movies\example.py
Traceback (most recent call last):
File "D:\movies\example.py", line 6, in <module>
print(get_subtitles('Bhakta Dhruva.mp4', lang='eng', sim_threshold=70, conf_threshold=65))
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\api.py", line 10, in get_subtitles
v = Video(video_path)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\video.py", line 26, in __init__
with Capture(path) as v:
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\opencv_adapter.py", line 11, in __enter__
raise IOError('Can not open video {}.'.format(self.path))
OSError: Can not open video Bhakta Dhruva.mp4.
Reply


Forum Jump:

User Panel Messages

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