Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: Cannot find and install python module 'video'

I am using Python 3.6. I tried to run the OpenCV optical flow code: https://github.com/opencv/opencv/blob/master/samples/python/opt_flow.py

and there was an error:

ModuleNotFoundError: No module named 'video'

I thought the 'video' module must be missing. So, I run

pip install video

in the command line, but it gave me this error:

Collecting video
  Could not find a version that satisfies the requirement video (from versions: )
No matching distribution found for video

Could anyone advise on how to solve this problem? How to find where are the OpenCV modules installed in local drive?

like image 276
PL01 Avatar asked Apr 11 '17 06:04

PL01


People also ask

How do I fix a Python module not found?

Python's ImportError ( ModuleNotFoundError ) indicates that you tried to import a module that Python doesn't find. It can usually be eliminated by adding a file named __init__.py to the directory and then adding this directory to $PYTHONPATH .


1 Answers

You need to add video.py, to your project. It not a package that you need to install rather its a module which exist in the same repo.

like image 180
Surajano Avatar answered Oct 11 '22 06:10

Surajano