Installing wheels directly from GitHub

Hello everyone,
I am trying to install a wheel (on Windows) directly from my public GitHub repo like this:

python -m pip install https://github.com/.../jsonpickle-4.0.0-py3-none-any.whl

It then begins to download the wheel and raises an error: ERROR: Wheel ‘jsonpickle’ located at C:\Users\pbrassel\AppData\Local\Temp\pip-unpack-xc6x24xn\jsonpickle-4.0.0-py3-none-any.whl is invalid.

But when I download the wheel manually and install it with its local path, it works.

Can someone explain this, please?

Without more info, it is hard to tell, but I suspect what is going on here is that this isn’t downloading the wheel, but the intended for human consumption page where that wheel is located. Github has separate links for raw files accessed over HTTP(S) and release artifacts.

2 Likes

Thats it, thank you! Makes sense that a HTML site is an invalid wheel.

You have to use the link pointing on the raw file. In GitHub there is a button to download the raw file where you can copy the correct link.