The most popular way to install the new Python package or library is to use
easy_install as introduced in Python tutorial installation section. But sometimes you couldn’t use these tools because of some restrictions like limited internet access. Here we will show you how to install a new Python package with a .whl file.
pipis already installed
pip.exeis not recognized, install it with the [
pipinstallation tutorial]](/tutorial/python-3-basic-tutorial/installation/). Or you could check whether it is in the Python scripts directory, but the scripts path is not in the system variable. Then you could simply add the Python scripts path to the system variable
C:\Python\Scriptsshould be updated to your own Python installation directory.
Download the whl file
You could download the unofficial windows binary for Python extension packages from this trustable UCI website https://www.lfd.uci.edu/~gohlke/pythonlibs/#jpype.
Install .whl file
For example, if you have downloaded
pycairo‑1.16.3‑cp27‑cp27m‑win32.whlto the folder
C:\Downloads\. Use the command below to install the whl package file
pip install C:\Downloads\pycairo‑1.16.3‑cp27‑cp27m‑win32.whl
It’s done. Good luck!