How do I install a Python package with a .whl file?

868    Asked by RutujaMishra in Python , Asked on Apr 10, 2021

How to install a Python package (specifically, JPype1 0.5.7) on my Windows machine, and would like to install it with Christoph Gohlke's Window binaries. (Which, to my experience, alleviated much of the fuss for many other package installations.)

However, while Christoph used to provide .exe files in the past, recently it seems he's uploading .whl files instead.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#jpype

But how do I install pip install whl files? Please help.

Answered by Rutuja Mishra

If you want to install it from the wheel, then keep the directory where the wheel is downloaded.

use the below code:

Install package_name.whl

Now, use this:

pip install --use-wheel --no-index --find-links=/where/its/downloaded package_name
But, ensure that you have updated pip first to enable wheel support:
pip install --upgrade pip

Your Answer

Interviews

Parent Categories