I am using Python in Jupyter Notebook. My Pandas version is
pandas: 0.23.4
in which I cannot use Explode or other advanced functions. I am trying to upgrade it using the codes like:
!pip install -- upgrade pandas
But keep receiving error messages like:
Could not fetch URL https://pypi.org/simple/ipython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ipython/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))) - skipping
Does anyone know how to rewrite the codes?
CodePudding user response:
I guess you need to provide more information about your setup, e.g., what operating system do you use. The call !pip install --upgrade pandas
executes shell command. If, for instance, you use Ubuntu, then this command will try to install the pandas package using system package manager, and it will fail because you need sudo privileges.
It seems that you try to execute locally the code developed for the cloud collaborative platforms (e.g., Google Colab). Unfortunately, you need to do this carefully.
I would recommend to you to create a separate virtual environment for your project and install dependencies there. For instance, I use poetry to manage the dependencies in my projects but you can also use others (virtualenv, anaconda, pipenv, etc.).
CodePudding user response:
It might provide a temporary solution. I think there is a proxy or firewall rule restricting connection to pypi.org;
pip config set global.trusted-host "pypi.org files.pythonhosted.org pypi.python.org" --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org