车轮文件安装 [英] Wheel file installation
问题描述
如何安装.whl文件?我有Wheel库,但是我不知道如何使用它来安装那些文件.我有.whl文件,但我不知道如何运行它.请帮忙.
How do I install a .whl file? I have the Wheel library but I don't know how to use it to install those files. I have the .whl file but I don't know how to run it. Please help.
推荐答案
通常使用pip
之类的工具来安装车轮.如果这是针对PyPI上托管的项目的,则将其留给工具以发现并下载文件.
You normally use a tool like pip
to install wheels. Leave it to the tool to discover and download the file if this is for a project hosted on PyPI.
要执行此操作,您需要安装wheel
软件包:
For this to work, you do need to install the wheel
package:
pip install wheel
然后您可以告诉pip
安装项目(如果有的话,它将下载滚轮),或者直接安装滚轮文件:
You can then tell pip
to install the project (and it'll download the wheel if available), or the wheel file directly:
pip install project_name # discover, download and install
pip install wheel_file.whl # directly install the wheel
wheel
模块一旦安装,也可以从命令行运行,您可以使用它来安装已经下载的轮子:
The wheel
module, once installed, also is runnable from the command line, you can use this to install already-downloaded wheels:
python -m wheel install wheel_file.whl
另请参见 wheel
项目文档.
Also see the wheel
project documentation.
这篇关于车轮文件安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!