Problem installing packages through pip3. Omega2+



  • I cannot install any package through pip3. An error occurs while trying to install:

    pip3 install paho-mqtt
    Collecting paho-mqtt
    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
        chunked=chunked)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 351, in _make_request
        self._validate_conn(conn)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 814, in _validate_conn
        conn.connect()
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 289, in connect
        ssl_version=resolved_ssl_version)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
        return context.wrap_socket(sock, server_hostname=server_hostname)
      File "/usr/lib/python3.6/ssl.py", line 401, in wrap_socket
        _context=self, _session=session)
      File "/usr/lib/python3.6/ssl.py", line 808, in __init__
        self.do_handshake()
      File "/usr/lib/python3.6/ssl.py", line 1061, in do_handshake
        self._sslobj.do_handshake()
      File "/usr/lib/python3.6/ssl.py", line 683, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 403, in send
        timeout=timeout
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 604, in urlopen
        raise SSLError(e)
    pip._vendor.requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 214, in main
        status = self.run(options, args)
      File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 299, in run
        requirement_set.prepare_files(finder)
      File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 370, in prepare_files
        ignore_dependencies=self.ignore_dependencies))
      File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 587, in _prepare_file
        session=self.session, hashes=hashes)
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 810, in unpack_url
        hashes=hashes
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 649, in unpack_http_url
        hashes)
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 842, in _download_http_url
        stream=True,
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 487, in get
        return self.request('GET', url, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 378, in request
        return super(PipSession, self).request(method, url, *args, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 585, in send
        r = adapter.send(request, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 46, in send
        resp = super(CacheControlAdapter, self).send(request, **kw)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 477, in send
        raise SSLError(e, request=request)
    pip._vendor.requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)
    

    No matter which package I want to install the error is the same.



  • @CAP-33 the error indicates there is an issue with your pip certificate setup which I expect is the result of problem in a python upgrade or pip upgrade. I suspect that your installation of pip3 reported warnings.

    First thing I would try is upgrading pip:

    pip3 install --upgrade pip

    If that fails then I would remove pip then reinstall it:

    opkg remove python3-pip
    opkg install python3-pip
    pip3 install --upgrade pip

    If that fails then report back and we can look further.



  • @crispyoz I reinstall pip3, but error did not disappear

    pip3 install --upgrade pip
    Collecting pip
    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
        chunked=chunked)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 351, in _make_request
        self._validate_conn(conn)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 814, in _validate_conn
        conn.connect()
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 289, in connect
        ssl_version=resolved_ssl_version)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
        return context.wrap_socket(sock, server_hostname=server_hostname)
      File "/usr/lib/python3.6/ssl.py", line 401, in wrap_socket
        _context=self, _session=session)
      File "/usr/lib/python3.6/ssl.py", line 808, in __init__
        self.do_handshake()
      File "/usr/lib/python3.6/ssl.py", line 1061, in do_handshake
        self._sslobj.do_handshake()
      File "/usr/lib/python3.6/ssl.py", line 683, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 403, in send
        timeout=timeout
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 604, in urlopen
        raise SSLError(e)
    pip._vendor.requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 214, in main
        status = self.run(options, args)
      File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 299, in run
        requirement_set.prepare_files(finder)
      File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 370, in prepare_files
        ignore_dependencies=self.ignore_dependencies))
      File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 587, in _prepare_file
        session=self.session, hashes=hashes)
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 810, in unpack_url
        hashes=hashes
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 649, in unpack_http_url
        hashes)
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 842, in _download_http_url
        stream=True,
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 487, in get
        return self.request('GET', url, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/download.py", line 378, in request
        return super(PipSession, self).request(method, url, *args, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 585, in send
        r = adapter.send(request, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 46, in send
        resp = super(CacheControlAdapter, self).send(request, **kw)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 477, in send
        raise SSLError(e, request=request)
    pip._vendor.requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)
    


  • @CAP-33 try adding --trusted-host pypi.org --trusted-host files.pythonhosted.org parameters



  • @crispyoz
    I managed to update the pip.

    pip3 install --upgrade --trusted-host files.pythonhosted.org pip
    Collecting pip
     Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
        100% |████████████████████████████████| 1.4MB 70kB/s
    Installing collected packages: pip
      Found existing installation: pip 8.1.2
        Uninstalling pip-8.1.2:
          Successfully uninstalled pip-8.1.2
    Successfully installed pip-20.0.2
    

    But pip does not install packages.

    pip3 install paho-mqtt
    Collecting paho-mqtt
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
    ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),))
    


  • @CAP-33 Try adding -v parameter so we can see where the failure is occuring. Are you behind a firewall or proxy?

    pip3 -v install paho-mqtt

    Also the pip log is in /tmp/pip-log.txt



  • @crispyoz

    pip3 -v install paho-mqtt
    Non-user install because site-packages writeable
    Created temporary directory: /tmp/pip-ephem-wheel-cache-b7wevy9u
    Created temporary directory: /tmp/pip-req-tracker-3uc03gc9
    Initialized build tracking at /tmp/pip-req-tracker-3uc03gc9
    Created build tracker: /tmp/pip-req-tracker-3uc03gc9
    Entered build tracker: /tmp/pip-req-tracker-3uc03gc9
    Created temporary directory: /tmp/pip-install-rhm6fdrw
    1 location(s) to search for versions of paho-mqtt:
    * https://pypi.org/simple/paho-mqtt/
    Fetching project page and analyzing links: https://pypi.org/simple/paho-mqtt/
    Getting page https://pypi.org/simple/paho-mqtt/
    Found index url https://pypi.org/simple
    Looking up "https://pypi.org/simple/paho-mqtt/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    https://pypi.org:443 "GET /simple/paho-mqtt/ HTTP/1.1" 304 0
      Found link https://files.pythonhosted.org/packages/4f/4a/7cacf78295fe9e9c8ee4edce2b817c9f506b218c44cae28d727807f935b3/paho-mqtt-0.4.90.tar.gz#sha256=6cbb955c504eefe02526aed063e51b646ad0e7a02642a0f6637690ae27941e9c (from https://pypi.org/simple/paho-mqtt/), version: 0.4.90
      Found link https://files.pythonhosted.org/packages/91/27/3764e239991acc8a202064e113be776fbd941320bde357b9e40b29fbcea7/paho-mqtt-0.4.91.tar.gz#sha256=b7fb297d1cb44ebab320d6ef44ff4d9ed32999a92b7caa9158d45a44d782c2e9 (from https://pypi.org/simple/paho-mqtt/), version: 0.4.91
      Found link https://files.pythonhosted.org/packages/02/59/4d183f02e06e9150be4d6f7fc76576301bd188227e0cb451979fdc1a0c6d/paho-mqtt-0.4.92.tar.gz#sha256=337967543be5d6555151114acf4d94cb9001de35b23d3dc9e3f8ad4d07cc62d5 (from https://pypi.org/simple/paho-mqtt/), version: 0.4.92
      Found link https://files.pythonhosted.org/packages/9c/fb/d1cdca82dc88edd7562bfa0f6795600e5352c10f5c1c5abf0e9963e8fe2f/paho-mqtt-0.4.94.tar.gz#sha256=70e4e2d43e714c23fbc70ba97b9ca31279a2dc2a893374c696237c547c4a2dad (from https://pypi.org/simple/paho-mqtt/), version: 0.4.94
      Found link https://files.pythonhosted.org/packages/e8/dc/4acbf85f11f1545eddadefa13f5ab858aa9a7f2a508413e6091ec316d307/paho-mqtt-0.9.tar.gz#sha256=e4592f205cbb63f1c67fb22307519dadd9af1c9453c1a9ddebca1ccfa7579c33 (from https://pypi.org/simple/paho-mqtt/), version: 0.9
      Found link https://files.pythonhosted.org/packages/51/ea/6c65fd07f5e77b9303fe4948caf81f6618a9e3e68a5f98c7dc0269d4dce0/paho-mqtt-0.9.1.tar.gz#sha256=97808e4bc0af628e7d8608bbc9d256726a12d5290c6a155064d54bdfa4041636 (from https://pypi.org/simple/paho-mqtt/), version: 0.9.1
      Found link https://files.pythonhosted.org/packages/ec/4d/834faa69313deec0d3414bdc276ec2e49d8b34e2305b6dbc70cf47d41f9a/paho-mqtt-1.0.tar.gz#sha256=b9d936ad11770c3168becddc4fce706eb369d4cab8273fbc435cc2d4052b3e8a (from https://pypi.org/simple/paho-mqtt/), version: 1.0
      Found link https://files.pythonhosted.org/packages/83/96/dacc2b78bc9c5cd83eed178e9ce35d7bceecf2dd38db079c0190423efd4a/paho-mqtt-1.1.tar.gz#sha256=0f7a629efe6e3a2c61b59d3550aa9f2c4529b5689a65fde45e6f1ac36b9a261e (from https://pypi.org/simple/paho-mqtt/), version: 1.1
      Found link https://files.pythonhosted.org/packages/82/d9/7064d3a0a1d62756a1a809c85b99f864c641b66de84c15458f72193b7708/paho-mqtt-1.2.tar.gz#sha256=9100a6aa706ab699d414ec02705a21eb66f436184691d0bf1f2a85a6213c6c1f (from https://pypi.org/simple/paho-mqtt/), version: 1.2
      Found link https://files.pythonhosted.org/packages/e0/fb/13680584b3781faf9da3eb5c4728e171d89357cb00cdf1cad6b4e30c8cc8/paho-mqtt-1.2.1.tar.gz#sha256=94f35ffc38ca1668b5c57dc47612284bf95b105d43d0cecd4c06896e2508779a (from https://pypi.org/simple/paho-mqtt/), version: 1.2.1
      Found link https://files.pythonhosted.org/packages/31/0f/53f71dc9033b492ba6546c452c35722621f9120cee6b905808d893fa0d97/paho-mqtt-1.2.2.tar.gz#sha256=cf297194d2a716010b5ff975f735d025ac3cdb4a317e9330abde4f73a006f1b0 (from https://pypi.org/simple/paho-mqtt/), version: 1.2.2
      Found link https://files.pythonhosted.org/packages/ce/27/28ac0859fb8d63754ec51659be265bf3b89d1568c5f6736d21026e11ea85/paho-mqtt-1.2.3.tar.gz#sha256=0fd746d8650563290f1bd0fec01e74cb57c3ab7406bdb58e5d9252bb5fa5ca44 (from https://pypi.org/simple/paho-mqtt/), version: 1.2.3
      Found link https://files.pythonhosted.org/packages/33/7f/3ce1ffebaa0343d509aac003800b305d821e89dac3c11666f92e12feca14/paho-mqtt-1.3.0.tar.gz#sha256=2c9ef5494cfc1e41a9fff6544c5a2cd59ea5d401d9119a06ecf7fad6a2ffeb93 (from https://pypi.org/simple/paho-mqtt/), version: 1.3.0
      Found link https://files.pythonhosted.org/packages/2a/5f/cf14b8f9f8ed1891cda893a2a7d1d6fa23de2a9fb4832f05cef02b79d01f/paho-mqtt-1.3.1.tar.gz#sha256=31911f6031de306c27ed79dc77b690d7c55b0dcb0f0434ca34ec6361d0371122 (from https://pypi.org/simple/paho-mqtt/), version: 1.3.1
      Found link https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904/paho-mqtt-1.4.0.tar.gz#sha256=e440a052b46d222e184be3be38676378722072fcd4dfd2c8f509fb861a7b0b79 (from https://pypi.org/simple/paho-mqtt/), version: 1.4.0
      Found link https://files.pythonhosted.org/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz#sha256=e3d286198baaea195c8b3bc221941d25a3ab0e1507fc1779bdb7473806394be4 (from https://pypi.org/simple/paho-mqtt/), version: 1.5.0
    Given no hashes to check 16 links for project 'paho-mqtt': discarding no candidates
    Using version 1.5.0 (newest of versions: 0.4.90, 0.4.91, 0.4.92, 0.4.94, 0.9, 0.9.1, 1.0, 1.1, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3.0, 1.3.1, 1.4.0, 1.5.0)
    Collecting paho-mqtt
      Created temporary directory: /tmp/pip-unpack-gli6ucz9
      Looking up "https://files.pythonhosted.org/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz" in the cache
      No cache entry available
      Starting new HTTPS connection (1): files.pythonhosted.org:443
      Incremented Retry for (url='/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      Starting new HTTPS connection (2): files.pythonhosted.org:443
      Incremented Retry for (url='/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      Starting new HTTPS connection (3): files.pythonhosted.org:443
      Incremented Retry for (url='/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      Starting new HTTPS connection (4): files.pythonhosted.org:443
      Incremented Retry for (url='/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      Starting new HTTPS connection (5): files.pythonhosted.org:443
      Incremented Retry for (url='/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),)': /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz
      Starting new HTTPS connection (6): files.pythonhosted.org:443
    ERROR: Could not install packages due to an EnvironmentError.
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 672, in urlopen
        chunked=chunked,
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 376, in _make_request
        self._validate_conn(conn)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 994, in _validate_conn
        conn.connect()
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connection.py", line 394, in connect
        ssl_context=context,
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
        return context.wrap_socket(sock, server_hostname=server_hostname)
      File "/usr/lib/python3.6/ssl.py", line 401, in wrap_socket
        _context=self, _session=session)
      File "/usr/lib/python3.6/ssl.py", line 808, in __init__
        self.do_handshake()
      File "/usr/lib/python3.6/ssl.py", line 1061, in do_handshake
        self._sslobj.do_handshake()
      File "/usr/lib/python3.6/ssl.py", line 683, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 449, in send
        timeout=timeout
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      [Previous line repeated 1 more times]
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 720, in urlopen
        method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
      File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/util/retry.py", line 436, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
    pip._vendor.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 331, in run
        resolver.resolve(requirement_set)
      File "/usr/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
        discovered_reqs.extend(self._resolve_one(requirement_set, req))
      File "/usr/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
        abstract_dist = self._get_abstract_dist_for(req_to_install)
      File "/usr/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
        abstract_dist = self.preparer.prepare_linked_requirement(req)
      File "/usr/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement
        hashes=hashes,
      File "/usr/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 287, in unpack_url
        hashes=hashes,
      File "/usr/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 159, in unpack_http_url
        link, downloader, temp_dir.path, hashes
      File "/usr/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 299, in _download_http_url
        download = downloader(link)
      File "/usr/lib/python3.6/site-packages/pip/_internal/network/download.py", line 189, in __call__
        resp = _http_get_download(self._session, link)
      File "/usr/lib/python3.6/site-packages/pip/_internal/network/download.py", line 157, in _http_get_download
        stream=True,
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 546, in get
        return self.request('GET', url, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_internal/network/session.py", line 405, in request
        return super(PipSession, self).request(method, url, *args, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 533, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 646, in send
        r = adapter.send(request, **kwargs)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 53, in send
        resp = super(CacheControlAdapter, self).send(request, **kw)
      File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 514, in send
        raise SSLError(e, request=request)
    pip._vendor.requests.exceptions.SSLError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:749)'),))
    Cleaning up...
    Removed build tracker: '/tmp/pip-req-tracker-3uc03gc9'
    

    There is a line here "No cache entry available".
    It seems that something is preventing Omega from connecting to the resource.
    Omega is connected to the Internet through a Wi-Fi router network.



  • @CAP-33 no cache entry is expected. This is an issue with the certificates, but you can work around by adding the following to your /etc/pip.conf:

    trusted-host = pypi.python.org
    pypi.org
    files.pythonhosted.org

    So it will look like this:

    [global]
    cache-dir=/tmp/.cache
    log-file=/tmp/pip-log.txt
    trusted-host = pypi.python.org
    pypi.org
    files.pythonhosted.org

    This is a workaround but try this first to confirm.



  • @crispyoz
    This method works. Thank you!


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.