- Run whl file python
- Step 1. Download the whl files you need (for instance on python2.7 32bit):
- Step 2. Run a command window as administrator in windows
- Step 3. Install the whl files one by one:
- Step 4. Test in a command-line to see everything is OK:
- Как установить Python пакет .Whl файл
- How to Install a Python Package with a .whl File?
- Background .whl Files
- Method 1: Powershell + pip + cd
- Method 2: Powershell + pip without cd
- Method 3: Powershell + pip + wheel
- Troubleshooting
Run whl file python
There are several very nice python packages that I use everyday. They include: numpy, scipy, matplotlib, …I used to install these packages on windows using pre-built binary installers.
Recently, I have noticed that those installers are being disappeared and in order to keep them updated you need either to install very large packages such as Anaconda or build the packages on your machine from source.
Then I found Unofficial Windows Binaries for Python Extension Packages. Here you can find almost all existing packages for python as whl files.
This page provides 32- and 64-bit Windows binaries of many scientific open-source extension packages for the official CPython distribution of the Python programming language. The files are unofficial (meaning: informal, unrecognized, personal, unsupported, no warranty, no liability, provided “as is”) and made available for testing and evaluation purposes. Most binaries are built from source code found on PyPI or in the projects public revision control systems. Source code changes, if any, have been submitted to the project maintainers or are included in the packages. You should use pip version 8 or newer to install the downloaded .whl files.
Since many binaries depend on numpy+mkl, install it before other packages that depend on it. As you can notice, the numpy has changed to numpy+mkl.
Numpy+MKL is linked to the Intel® Math Kernel Library and includes required DLLs in the numpy.core directory.
Step 1. Download the whl files you need (for instance on python2.7 32bit):
numpy-1.11.3+mkl-cp27-cp27m-win32.whl scipy-0.19.0-cp27-cp27m-win32.whl matplotlib-1.5.3-cp27-cp27m-win32.whl
Step 2. Run a command window as administrator in windows
Window+R Type: cmd R-click select Run as Administrator
Step 3. Install the whl files one by one:
pip install numpy-1.11.3+mkl-cp27-cp27m-win32.whl pip install scipy-0.19.0-cp27-cp27m-win32.whl pip install matplotlib-1.5.3-cp27-cp27m-win32.whl
Step 4. Test in a command-line to see everything is OK:
c:\python >>> import numpy as np >>> import scipy as sp >>> import matplotlib.pyplot as plt
Как установить Python пакет .Whl файл
Наиболее популярным способом установки нового пакета или библиотеки Python является использование pip или easy_install , как это описано в разделе Python tutorial installation section. Но иногда вы не можете использовать эти инструменты из-за некоторых ограничений, таких как ограниченный доступ в Интернет. Здесь мы покажем вам, как установить новый пакет Python с файлом .whl.
pip уже установлена
Если pip или pip.exe не распознан, установите его с помощью pip учебника по установке. Или вы можете проверить, находится ли он в каталоге скриптов Python, но путь к скриптам не находится в системной переменной. Тогда вы можете просто добавить путь к скриптам Python в системную переменную PATH .
set PATH=C:\Python\Scripts;%PATH%
Здесь, C:\Python\Scripts следует обновить в вашем собственном каталоге установки Python.
Загрузите файл .whl
Вы можете скачать неофициальный бинарный файл windows для пакетов расширения Python с этого надёжного сайта UCI https://www.lfd.uci.edu/~gohlke/pythonlibs/#jpype.
Установите файл .whl
Например, если Вы скачали pycairo-1.16.3-cp27-cp27m-win32.whl в папку C:\Downloads\ . Используйте команду ниже, чтобы установить файл пакета whl .
pip install C:\Downloads\pycairo-1.16.3-cp27-cp27m-win32.whl
Founder of DelftStack.com. Jinku has worked in the robotics and automotive industries for over 8 years. He sharpened his coding skills when he needed to do the automatic testing, data collection from remote servers and report creation from the endurance test. He is from an electrical/electronics engineering background but has expanded his interest to embedded electronics, embedded programming and front-/back-end programming.
How to Install a Python Package with a .whl File?
Problem Formulation: Given a file yourPackage.whl that resides in the folder C:\your\folder\ . How to install it on your Windows machine?
Background .whl Files
A .whl file (read: wheel file) is a zip archive that contains all the files necessary to run a Python application.
It’s a built-package format for Python, i.e., a zip archive with .whl suffix such as in yourPackage.whl . The purpose of a wheel is to contain all files for a PEP-compliant installation that approximately matches the on-disk format.
It allows you to migrate a Python application from one system to another in a simple and robust way.
Method 1: Powershell + pip + cd
This GIF shows you how you’d install a .whl package (e.g., downloaded from the Python Package index)—if unlike me, you’d downloaded the correct .whl file for your environment ;):
- Open your Windows command line or Powershell.
- cd into the folder where the yourPackage.whl file resides.
- Optional: Install pip on Windows. Chances are that it’s already installed—it comes with many Python distributions.
- Run the following command:
pip install yourPackage.whl
Method 2: Powershell + pip without cd
- Open your Windows command line or Powershell.
- Optional: Install pip on Windows. Chances are that it’s already installed—it comes with many Python distributions.
- Run the following command:
pip install C:\your\folder\yourPackage.whl
Method 3: Powershell + pip + wheel
- Open the Powershell or command line in Windows
- Upgrade pip to ensure that wheel is supported—which it is only for the newer versions of pip :
pip install --use-wheel --no-index --find-links=C:\your\folder\ yourPackage
Troubleshooting
If you experience problems with the installation, you may want to go over the following list with possible fixes, in this order:
- Open the command line or Powershell as an administrator by right-clicking on the program symbol and select “Open as administrator”:
pip3 install C:\your\folder\yourPackage.whl
python -m pip install some-package.whl
While working as a researcher in distributed systems, Dr. Christian Mayer found his love for teaching computer science students.
To help students reach higher levels of Python success, he founded the programming education website Finxter.com that has taught exponential skills to millions of coders worldwide. He’s the author of the best-selling programming books Python One-Liners (NoStarch 2020), The Art of Clean Code (NoStarch 2022), and The Book of Dash (NoStarch 2022). Chris also coauthored the Coffee Break Python series of self-published books. He’s a computer science enthusiast, freelancer, and owner of one of the top 10 largest Python blogs worldwide.
His passions are writing, reading, and coding. But his greatest passion is to serve aspiring coders through Finxter and help them to boost their skills. You can join his free email academy here.
Be on the Right Side of Change 🚀
- The world is changing exponentially. Disruptive technologies such as AI, crypto, and automation eliminate entire industries. 🤖
- Do you feel uncertain and afraid of being replaced by machines, leaving you without money, purpose, or value? Fear not! There a way to not merely survive but thrive in this new world!
- Finxter is here to help you stay ahead of the curve, so you can keep winning as paradigms shift.
Learning Resources 🧑💻
⭐ Boost your skills. Join our free email academy with daily emails teaching exponential with 1000+ tutorials on AI, data science, Python, freelancing, and Blockchain development!
Join the Finxter Academy and unlock access to premium courses 👑 to certify your skills in exponential technologies and programming.
New Finxter Tutorials:
Finxter Categories: