samim23/polymath

Verification of certificate failed

Closed this issue · 2 comments

Crazy how far this tech has come lately. Nice work. I've got to this point "pip install -r requirements.txt" and I get the below error message. Seems as if there was an issue with verifying the SSL certificate when attempting to download. I've upgraded SSL certificates with pip install --upgrade certifi and still getting the error. Have any ideas to get past that? Thanks

djm@DJs-MacBook-Pro polymath % pip install -r requirements.txt
Collecting crepe==0.0.13
  Using cached crepe-0.0.13.tar.gz (15 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      /private/var/folders/t4/7st1z6512vv_cqxm52tvglz40000gn/T/pip-install-ubxfn9y6/crepe_7a8be73f6b92479495dd90a3163e2079/setup.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
        import imp
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
          h.request(req.get_method(), req.selector, req.data, headers,
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request
          self._send_request(method, url, body, headers, encode_chunked)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request
          self.endheaders(body, encode_chunked=encode_chunked)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders
          self._send_output(message_body, encode_chunked=encode_chunked)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output
          self.send(msg)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send
          self.connect()
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect
          self.sock = self._context.wrap_socket(self.sock,
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 512, in wrap_socket
          return self.sslsocket_class._create(
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1070, in _create
          self.do_handshake()
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1341, in do_handshake
          self._sslobj.do_handshake()
      ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/t4/7st1z6512vv_cqxm52tvglz40000gn/T/pip-install-ubxfn9y6/crepe_7a8be73f6b92479495dd90a3163e2079/setup.py", line 30, in <module>
          urlretrieve(base_url + compressed_file, compressed_path)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 241, in urlretrieve
          with contextlib.closing(urlopen(url, data)) as fp:
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
          return opener.open(url, data, timeout)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
          response = self._open(req, data)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
          result = self._call_chain(self.handle_open, protocol, protocol +
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
          result = func(*args)
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
          return self.do_open(http.client.HTTPSConnection, req,
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
          raise URLError(err)
      urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
      Downloading weight file model-tiny.h5.bz2 ...
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

If you can, please leave a note here how you resolved your issue. It might be useful for other users in the future.

Hello. Looked into it more and pretty sure it has something to do with multiple Python installs screwing something up. Trouble shooting that now and didn't want to leave it open if it had nothing to do with the project. Will drop note back here if it's related to Polymath. Got it running on someone else's computer and it's very cool.