I'm having trouble installing 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 .whl files?
Notes:
- I've found documents on wheel, but they don't seem so staightforward in explaining how to install .whl files.
- This question is a duplicate with this question, which wasn't directly answered.
In-case if you unable to install specific package directly using PIP.
You can download a specific
.whl
(wheel) package from - https://www.lfd.uci.edu/~gohlke/pythonlibs/CD (Change directory) to that downloaded package and install it manually by -
pip install PACKAGENAME.whl
ex:
pip install ad3‑2.1‑cp27‑cp27m‑win32.whl
I just used the following which was quite simple. First open a console then cd to where you've downloaded your file like some-package.whl and use
Note: if pip.exe is not recognized, you may find it in the "Scripts" directory from where python has been installed. If pip is not installed, this page can help: How do I install pip on Windows?
Note: for clarification
If you copy the
*.whl
file to your local drive (ex. C:\some-dir\some-file.whl) use the following command line parameters --New Python users on Windows often forget to add Python's \Scripts directory to the PATH variable during the installation. I recommend to use the Python launcher and execute pip as a script with the
-m
switch. Then you can install the wheels for a specific Python version (if more than one are installed) and the Scripts directory doesn't have to be in the PATH. So open the command line, navigate (with thecd
command) to the folder where the .whl file is located and enter:Replace
3.6
by your Python version or just enter-3
if the desired Python version appears first in the PATH. And with an active virtual environment:py -m pip install your_whl_file.whl
.Of course you can also install packages from PyPI in this way, e.g.
I am in the same boat as the OP.
Using a Windows command prompt, from directory:
seemed to work.
Changing directory to where the whl was located, it just tells me 'pip is not recognized'. Going back to
C:\Python34\Scripts>
, then using the full command above to provide the 'where/its/downloaded' location, it saysRequirement 'scikit_image-...-win32.whl' looks like a filename, but the filename does not exist
.So I dropped a copy of the .whl in Python34/Scripts, ran the exact same command over again (with the
--find-links=
still going to the other folder), and this time it worked.The only way I managed to install NumPy was as follows:
I downloaded NumPy from here https://pypi.python.org/pypi/numpy
This Module
Command execution from Python's installation path in PowerShell
PS.: I installed it on Windows 10.
I would be suggesting you the exact way how to install .whl file. Initially I faced many issues but then I solved it, Here is my trick to install .whl files.
Follow The Steps properly in order to get a module imported
3.Now, enter the command written below
Click enter and make sure you enter the version you are currently using with correct file name.
Once you press enter, wait for few minutes and the file will be installed and you will be able to import the particular module.
In order to check if the module is installed successfully, import the module in idle and check it.
Thank you:)