Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle, invalid path

前端 未结 3 1637
太阳男子
太阳男子 2021-01-03 15:38

I get this error:

Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle, invalid path: /home/yosr

3条回答
  •  再見小時候
    2021-01-03 16:01

    You need to allow pip to reference to the correct certificate. check the certificate first;

    python -c "import certifi; print(certifi.where())"
    

    Then first test it manually;

    pip install -r requirements.txt --cert=
    

    If that works fine, then update this path on pip.conf file located at $HOME/.pip/pip.conf (or %APPDATA%\pip\pip.ini on Windows). e.g.

    [global]
    cert = /usr/local/share/ca-certificate/mycert.crt
    

提交回复
热议问题