You want to install a downloaded wheel (.whl) file on Python under Windows?
- Install pip on your Python(s) on Windows (on Python 3.4+ it is already included)
Upgrade pip if necessary (on the command line)
pip install -U pip
Install a local wheel file using pip (on the command line)
pip install --no-index --find-links=LocalPathToWheelFile PackageName
Option --no-index
tells pip to not look on pypi.python.org (which would fail for many packages if you have no compiler installed), --find-links
then tells pip where to look for instead. PackageName
is the name of the package (numpy, scipy, .. first part or whole of wheel file name). For more informations see the install options of pip.
You can execute these commands in the command prompt when switching to your Scripts
folder of your Python installation.
Example:
cd C:Python27Scripts
pip install -U pip
pip install --no-index --find-links=LocalPathToWheelFile PackageName
Note: It can still be that the package does not install on Windows because it may contain C/C++ source files which need to be compiled. You would need then to make sure a compiler is installed. Often searching for alternative pre-compiled distributions is the fastest way out.
For example numpy-1.9.2+mkl-cp27-none-win_amd64.whl
has PackageName
numpy
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…