1

I am trying to install openCv for Python 3.6 on my Raspberry Pi 3 Model B+, but somehow it won't connect to the python.org website. I have pip installed for 2.7, 3.0, and 3.6 installed, so when I go and do something like:

pip3 install opencv-python

I get this error:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting opencv-python
 Could not fetch URL https://pypi.python.org/simple/opencv-python/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
 Could not fetch URL https://www.piwheels.org/simple/opencv-python/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
 Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python

I can access the website perfectly on my desktop and phone, but my Raspberry Pi won't at all. Any idea what I can do?

Ingo
43k20 gold badges87 silver badges207 bronze badges
asked Jul 19, 2018 at 5:58
1

2 Answers 2

1

pip3 missed a certificate for authentication to https://pypi.python.org/simple/opencv-python/ and to https://www.piwheels.org/simple/opencv-python/. On my RasPi (Raspbian Stretch) I found two packages in its repository with apt list *certi* that may belonging to it:

ca-certificates/stable,now 20161130+nmu1+deb9u1 all [installed]
python3-certifi/stable 2016年2月28日-1 all

You can try to install them but I don't know if it helps:

rpi ~$ sudo apt update
rpi ~$ sudo apt full-upgrade
rpi ~$ sudo apt install ca-certificates python3-certifi
answered Jul 19, 2018 at 9:15
2
  • 1
    Not helping, tried it too Commented Jul 19, 2018 at 10:50
  • 1
    Next thing to check, if certificates are up-to-date, is the system date and time - if it's e.g. far off in the past, the certificates will be rejected. Commented Mar 1, 2019 at 9:30
-1

You need to install following dependencies.

Run in following in your terminal

sudo apt-get install build-essential checkinstall 
sudo apt-get install libc6-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libbz2-dev
answered Jul 19, 2018 at 6:12
3
  • Yes, I have run these on my terminal Commented Jul 19, 2018 at 6:58
  • still after executing the command it is showing the same error Commented Jul 19, 2018 at 6:59
  • In that case, check this out stackoverflow.com/a/41601137/6538713 Commented Jul 19, 2018 at 9:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.