Wheels says no...

Sakis Kasampalis | Nov 2, 2018 min read

Computer says no

After porting one of our libraries at work in Python 3, I wanted to publish it as a package. The tool that we are using to distribute packages is wheels.

Unfortunately, wheels was refusing to create the package. It was reporting an error similar to the following: wheel.cli.WheelError: "Bad wheel filename mypackage-latest-cp36-cp36m-linux_x86_64.whl".

After searching online without any luck, I found a GitHub issue mentioning PEP 440. Well, it turns out that the “latest” part of the package name is not very PEP 440 compliant… So wheels was right to complain. And all I had to do was modify the name to make it compliant. The PEP document has many examples of compliant schemes, so if you are facing a similar error pick any scheme that fits you.