The required opencv-python-headless version could not be found
Closed this issue · 4 comments
When I try to use pip install it gives me this error because it can't find this version of opencv-python-headless. I tried using pip install to install the latest opencv-python-headless, which is 4.2.0.34, but when I tried to install your package it still tried to grab the older version dependency and returned that error.
I've made sure that I uninstalled previous opencv-python versions before doing this too.
(venv) C:\Users\Stuart\PycharmProjects\bot_tutorial1>pip install Multi-Template-Matching
Collecting Multi-Template-Matching
Using cached Multi_Template_Matching-1.5.3-py3-none-any.whl (22 kB)
Collecting scikit-image
Using cached scikit_image-0.17.1-cp38-cp38-win32.whl (10.6 MB)
Requirement already satisfied: numpy in c:\users\stuart\pycharmprojects\bot_tutorial1\venv\lib\site-packages (from Multi-Template-Matching) (1.18.4)
ERROR: Could not find a version that satisfies the requirement opencv-python-headless==4.1.0.25 (from Multi-Template-Matching) (from versions: 3.4.8.29, 3.4.9.31, 3.4.9.33, 4.1.2.30, 4.2.0.32, 4.2.0.34)
ERROR: No matching distribution found for opencv-python-headless==4.1.0.25 (from Multi-Template-Matching)
Hi, thanks for finding this out,
You can force pip to ignore installing the packages defined as dependencies by using the --no-dependencies
flag.
So like
pip install --no-dependencies Multi-Template-Matching
This should solve the installation issue.
Just make sure that the dependencies are already installed, or install them manually with the version of your choice.
'numpy',
'opencv-python-headless'
'scikit-image',
'scipy',
'pandas'
Can you let me know if Multi-Template-Matching works with this OpenCV version ?
Like you can run the example notebooks in the tutorial folder.
I think I will not mention versions in the setup.py
used by pip and just mentioned them in requirements.txt
just to have a reference of a working configuration somewhere.
Apparently the issue can also be due to an old version of pip. You can try a
pip install --upgrade pip
too
See FAQ at https://pypi.org/project/opencv-python-headless/4.1.0.25/
Just tried manually installing the dependencies and I got it to work with the newer version of opencv (4.2.0.34). Thanks a lot for helping!
Great, I published a new release that does not enforce a particular version of opencv. As far as I know MTM works will any version so far. Let see in the future.