1 year ago
#372970
Memmo
Jython open default system webcam
I would like to make a tool that opens the system default web cam and returns the paths of the taken/selected images.
I tried to use the cv2 python library, but I couldn't install it, having reported the following error in console:
jython -m pip install cv2
DEPRECATION: A future version of pip will drop support for Python 2.7. Collecting opencv-python ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'Nov 23 18:41:10 2022 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))} WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'pypi.org' doesn't match either of 'www.python.org', '.python.org', 'docs.python.org', 'downloads.python.org', 'pypi.python.org'",),)': /simple/opencv-python/ ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'Nov 23 18:41:10 2022 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))} WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'pypi.org' doesn't match either of 'www.python.org', '.python.org', 'docs.python.org', 'downloads.python.org', 'pypi.python.org'",),)': /simple/opencv-python/ ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'Nov 23 18:41:10 2022 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))} WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'pypi.org' doesn't match either of 'www.python.org', '.python.org', 'docs.python.org', 'downloads.python.org', 'pypi.python.org'",),)': /simple/opencv-python/ ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'Nov 23 18:41:10 2022 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))} WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'pypi.org' doesn't match either of 'www.python.org', '.python.org', 'docs.python.org', 'downloads.python.org', 'pypi.python.org'",),)': /simple/opencv-python/ ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'Nov 23 18:41:10 2022 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))} WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'pypi.org' doesn't match either of 'www.python.org', '.python.org', 'docs.python.org', 'downloads.python.org', 'pypi.python.org'",),)': /simple/opencv-python/ ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'Nov 23 18:41:10 2022 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))} Could not fetch URL https://pypi.org/simple/opencv-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/opencv-python/ (Caused by SSLError(CertificateError("hostname 'pypi.org' doesn't match either of 'www.python.org', '.python.org', 'docs.python.org', 'downloads.python.org', 'pypi.python.org'",),)) - skipping ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none) ERROR: No matching distribution found for opencv-python ERROR: Certificate did not match expected hostname: pypi.org. Certificate: {'notAfter': 'Nov 23 18:41:10 2022 GMT', 'subject': ((('commonName', 'www.python.org'),),), 'subjectAltName': (('DNS', 'www.python.org'), ('DNS', '.python.org'), ('DNS', 'docs.python.org'), ('DNS', 'downloads.python.org'), ('DNS', 'pypi.python.org'))} Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(CertificateError("hostname 'pypi.org' doesn't match either of 'www.python.org', '.python.org', 'docs.python.org', 'downloads.python.org', 'pypi.python.org'",),)) - skipping
I was wondering if the library wasn't too advanced for python version 2.7, and I was wondering if using python instead of java for this task was the best choice.
Thanks in advance.
python
java
opencv
jython
jython-2.7
0 Answers
Your Answer