No matching distribution found for cherrypy

No matching distribution found for cherrypy message is displayed while installing cherrypi.

Issue

Below is the error message that I am receiving while installing Cherrypi python package,

pip3 install cherrypy
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting cherrypy
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fff78549b00>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/cherrypy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fff785498d0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/cherrypy/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fff78549dd8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/cherrypy/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fff785496d8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/cherrypy/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fff7854cc18>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/cherrypy/
  Could not find a version that satisfies the requirement cherrypy (from versions: )
No matching distribution found for cherrypy
No matching distribution found for cherrypy

Checking the issue from the above error message, “Failed to establish a new connection” is something that I looked at and then I tried to download a Cherrypi wheel package directly to see if I can download or not.

No matching distribution found for cherrypy is also coming up at the end of the message.

Below is the error message while trying to download the wheel file directly. Even that also failed with error message.

wget https://files.pythonhosted.org/packages/9e/89/e333e597c090d12d3a0d208f751366da7db8c44c8b392b467dd993366e53/CherryPy-18.6.1-py2.py3-none-any.whl
--2022-06-06 05:32:23--  https://files.pythonhosted.org/packages/9e/89/e333e597c090d12d3a0d208f751366da7db8c44c8b392b467dd993366e53/CherryPy-18.6.1-py2.py3-none-any.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... failed: Name or service not known.
wget: unable to resolve host address ‘files.pythonhosted.org’
No matching distribution found for cherrypy

Even a direct clone of Cherrypi package was also not working.

Resolution

Upon looking at the error message, we can see that wget is not working, and looks like there is a network issue while downloading the package.

Update resolv.conf file with nameserver 8.8.8.8 and then try to download the package.

Navigate to /etc/ directory and update resolv.conf file with the above nameserver parameter and then try to download the file as well as install the package.

Upon updating the resolv.conf file, I was able to install the package successfully.

Matching distribution found for cherrypy

A direct package can be searched and downloaded from here.

Download cherrypi package from here.

Leave a Reply

Your email address will not be published. Required fields are marked *