Python Forum
pip3 install opencv-python fails on 'skbuild'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pip3 install opencv-python fails on 'skbuild'
#1
With some help from askubuntu I got it working:

I used:

Quote:sudo apt-get install python3-opencv

I must have installed the module for Python 2!!

I would like to dabble with qr codes.

From here I see I need opencv-python, qrcode and numpy

The FAQ on the link above says:

Quote:Q: Pip install fails with ModuleNotFoundError: No module named 'skbuild'?

Since opencv-python version 4.3.0.*, manylinux1 wheels were replaced by manylinux2014 wheels. If your pip is too old, it will try to use the new source distribution introduced in 4.3.0.38 to manually build OpenCV because it does not know how to install manylinux2014 wheels. However, source build will also fail because of too old pip because it does not understand build dependencies in pyproject.toml. To use the new manylinux2014 pre-built wheels (or to build from source), your pip version must be >= 19.3. Please upgrade pip with pip install --upgrade pip.

But, when I try:

Quote:pedro@pedro-512ssd:~$ pip3 install --upgrade pip3
Collecting pip3

this fails.

I have:

Quote:pedro@pedro-512ssd:~$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

The above FAQ states: "your pip version must be >= 19.3"

I think I should be using pip3, not pip but upgrading pip also fails:

Quote:pedro@pedro-512ssd:~$ pip install --upgrade pip
Collecting pip
Cache entry deserialization failed, entry ignored
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip
pedro@pedro-512ssd:~$

How can I get cv2 working??
Reply
#2
try: pip3 install opencv-python
Reply
#3
(Sep-15-2020, 12:08 AM)Pedroski55 Wrote: pedro@pedro-512ssd:~$ pip3 install --upgrade pip3
Collecting pip3

this fails.
It is like this no pip3 last when upgrade,test with pip3 -V after.
pip3 install --upgrade pip
# Or if need sudo
sudo pip3 install --upgrade pip

# Then install
pip3 install opencv-python
# Or no sudo
pip3 install --user opencv-python
To get upgrade of all look at pyenv Simple Python Version Management
A 2-minutte demo to install Python 3.8.5 and opencv-python.
# install 3.8.5
mint@mint ~ $ pyenv install 3.8.5
Installing Python-3.8.5...
Installed Python-3.8.5 to /home/mint/.pyenv/versions/3.8.5
 
# Set global(system wide)
mint@mint ~ $ pyenv global 3.8.5

# Test pip
tom@tom-VirtualBox:~$ pip -V
pip 20.2.3 from /home/tom/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip (python 3.8)

# Install opencv-python
tom@tom-VirtualBox:~$ pip install opencv-python
Collecting opencv-python ...
Successfully installed opencv-python-4.4.0.42

# Test that it work
tom@tom-VirtualBox:~$ python
Python 3.8.5 (default, Sep 15 2020, 12:43:19) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2

>>> 
>>> cv2.__version__
'4.4.0'
>>> exit()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with using opencv in python Raunak1023984765 21 1,640 Feb-21-2024, 04:25 PM
Last Post: Pedroski55
  Anaconda 2.4.2: The JupyterLab 3.5.3 fails to run the python code of the Geographical jamalnuman 0 331 Aug-23-2023, 07:48 AM
Last Post: jamalnuman
  ModuleNotFoundError: No module named '_struct' when starting pip3 yuhuihu 0 2,863 May-05-2022, 04:41 AM
Last Post: yuhuihu
  cmake and pip3 install warnings with python 3.10.2 cyrduf 0 1,894 Feb-26-2022, 01:08 PM
Last Post: cyrduf
  Help for the shortest way to install a suitable version of Python, Numpy, and OpenCV. Ezzat 2 2,275 Dec-23-2021, 12:34 PM
Last Post: snippsat
  what to do if moudle not in pip3 only in pip2? korenron 22 5,740 Oct-25-2021, 02:35 PM
Last Post: snippsat
  pip3 v21.1.2 SSL Error on RHEL 7 malibu 0 3,095 Jun-01-2021, 03:17 PM
Last Post: malibu
  Python OpenCV window not opening in fullscreen mode Zman350x 0 3,291 Apr-29-2021, 07:54 PM
Last Post: Zman350x
  Embedded python fails to compile on Raspberry Pi tryfon 2 3,466 Dec-22-2020, 02:06 PM
Last Post: tryfon
  Python IDE doesn't see opencv-python package on my Jetson Nano sadhaonnisa 1 3,333 Oct-11-2020, 01:04 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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