Closed mkrajnak closed 4 years ago
What's the version of pip
? pip >= 19.3 is required for the two latest releases due to manylinux2014
. Check the release notes: https://github.com/skvark/opencv-python/releases/tag/36
pip
tries to compile from source because it does not find compatible pre-built wheels. Manylinux
pip
version requirement table is here: https://github.com/pypa/manylinux#manylinux
You can upgrade pip
with (also found from the README of this repository): pip install --upgrade pip
Yes you are right, I didn't notice that the machine comes with the older version of pip, sudo pip3 install --upgrade pip
solved this for me. Thanks a lot !
please consider reopen:
docker build -t testo-opecv-python .
=========== Dockerfile ============== FROM ubuntu:18.04
ENV LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8
RUN echo "$LOG_TAG update and install basic packages" && \ apt-get -y update && \ apt-get install -y locales apt-utils && \ locale-gen $LANG && update-locale $LANG && \ apt-get install -y software-properties-common && \ apt-get install -y build-essential pkg-config libffi-dev
RUN apt-get install -y python-pip
RUN pip install --upgrade pip && \ pip --version && \ pip install wheel && \ pip install opencv-python
==================================
FROM ubuntu:18.04
ENV LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8
RUN echo "$LOG_TAG update and install basic packages" && \ apt-get -y update && \ apt-get install -y locales apt-utils && \ locale-gen $LANG && update-locale $LANG && \ apt-get install -y software-properties-common && \ apt-get install -y build-essential pkg-config libffi-dev
RUN apt-get install -y python-pip
Python 2.7 hasn't been supported since 4.3.0.36. Your pip
points most likely to Python 2.7. Use pip3
instead. There is no Python 2.7 wheels for 4.3.0.36 or source distribution (https://pypi.org/project/opencv-python/4.3.0.36/#files) so you must have used Python 3 for that working version.
Thank you, using pip3 fixes it .
Expected behaviour
The older version works fine:
Actual behaviour
Steps to reproduce
this is happening on rhel8 (fresh install. no previous versions of opencv installed), python3 version:
Workarounds that I have tried (stack overflow):
I believe the python3.6 is supported, I am using the
opencv-python==4.2.0.34
as a workaround for now, were there new dependencies added between the versions? Do I really need cmake to make opencv work?If the issue is common, I am sorry I've spent some time on this a couldn't find anything helpful.