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?
-
stackoverflow.com/questions/25981703/…MatsK– MatsK2018年07月19日 09:26:18 +00:00Commented Jul 19, 2018 at 9:26
2 Answers 2
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
-
1Not helping, tried it toosudeep banik– sudeep banik2018年07月19日 10:50:33 +00:00Commented Jul 19, 2018 at 10:50
-
1Next 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.Tomasz Gandor– Tomasz Gandor2019年03月01日 09:30:05 +00:00Commented Mar 1, 2019 at 9:30
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
-
Yes, I have run these on my terminalsudeep banik– sudeep banik2018年07月19日 06:58:41 +00:00Commented Jul 19, 2018 at 6:58
-
still after executing the command it is showing the same errorsudeep banik– sudeep banik2018年07月19日 06:59:22 +00:00Commented Jul 19, 2018 at 6:59
-
In that case, check this out stackoverflow.com/a/41601137/6538713MaNyYaCk– MaNyYaCk2018年07月19日 09:39:06 +00:00Commented Jul 19, 2018 at 9:39