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'
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 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:[email protected]:~$ pip3 install --upgrade pip3
Collecting pip3

this fails.

I have:

Quote:[email protected]:~$ 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:[email protected]:~$ 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
[email protected]:~$

How can I get cv2 working??
try: pip3 install opencv-python
(Sep-15-2020, 12:08 AM)Pedroski55 Wrote: [email protected]:~$ 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
[email protected] ~ $ 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)
[email protected] ~ $ pyenv global 3.8.5

# Test pip
[email protected]:~$ 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
[email protected]:~$ pip install opencv-python
Collecting opencv-python ...
Successfully installed opencv-python-

# Test that it work
[email protected]:~$ 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__
>>> exit()

Possibly Related Threads…
Thread Author Replies Views Last Post
  Embedded python fails to compile on Raspberry Pi tryfon 2 299 Dec-22-2020, 02:06 PM
Last Post: tryfon
  Python IDE doesn't see opencv-python package on my Jetson Nano sadhaonnisa 1 463 Oct-11-2020, 01:04 AM
Last Post: Larz60+
  Runs perfect in Python but fails to print last statement when converted to .exe. Help sunil422 3 537 Aug-13-2020, 01:22 PM
Last Post: deanhystad
  python and openCV installation dejhost 16 2,200 Aug-04-2020, 02:23 AM
Last Post: snippsat
  Python 3.6.10 fails when running a localized script. Mikee 2 505 Jul-09-2020, 10:25 PM
Last Post: Mikee
  Install Fails v3.8.3 flyboy91901 0 427 Jun-26-2020, 05:31 PM
Last Post: flyboy91901
  cannot build python 3.8.2 (make test fails on test_imprtlib) borabora 1 709 May-08-2020, 09:10 PM
Last Post: Larz60+
  Install module with pip3 on a non root user matthewpintor2107 1 653 Apr-28-2020, 03:16 PM
Last Post: pyzyx3qwerty
  How to detect the text above lines using OpenCV in Python pframe 0 752 Apr-14-2020, 09:53 AM
Last Post: pframe
  Wrong pip3 python location or new Version 007fred50 1 1,244 Apr-02-2020, 02:36 PM
Last Post: philgoetz

Forum Jump:

User Panel Messages

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