網(wǎng)站首頁(yè) 編程語(yǔ)言 正文
.whl文件解釋
whl文件時(shí)以wheel格式保存的python安裝包,Wheel是Python發(fā)行版的標(biāo)準(zhǔn)內(nèi)置包格式。WHL文件包含Python安裝的所有文件和元數(shù)據(jù),其中還包括所使用的Wheel版本和打包的規(guī)范。WHL文件使用Zip壓縮進(jìn)行壓縮,實(shí)際上也是一種壓縮文件。
目前wheel被認(rèn)為是python的二進(jìn)制包的標(biāo)準(zhǔn)格式。
說(shuō)白了,.whl就是python的壓縮包
舉個(gè)栗子:
rknn_toolkit-1.7.1-cp36-cp36m-win_amd64.whl
其中,rknn_toolkit是文件名,cp36指的是對(duì)應(yīng)的python版本,cp36就是python3.6,同理,cp37就是python3.7,win指操作系統(tǒng)為windows,amd指64位
whl文件的安裝格式:
pip install 文件名.whl
一些報(bào)錯(cuò)的說(shuō)明
1.file does not exist
這時(shí),你需要把終端的文件位置切換為你保存.whl文件的地址
比如我的文件地址:
2..whl is not a supported wheel on this platform.
這代表你當(dāng)前的python版本和.whl文件的python版本不一致,此時(shí)切換環(huán)境即可
成功安裝頁(yè)面
補(bǔ)充:whl文件安裝失敗解決方法
在cmd命令行下安裝whl文件:
pip install ***.whl
***是文件名,也可以是路徑+文件名
報(bào)錯(cuò):***.whl is not a supported wheel on this platform.
原因一:文件和python不匹配(文件名中cm后面的數(shù)字和python版本應(yīng)該匹配)
查看python版本(Shell):
ADM64
import pip._internal print(pip._internal.pep425tags.get_supported())
WIN32
import pip print(pip.pep425tags.get_supported())
如果輸入不對(duì)會(huì)出現(xiàn):AttributeError: module 'pip' has no attribute 'pep425tags'
輸入成功可進(jìn)入python目錄,查看支持的版本
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import pip._internal >>> print(pip._internal.pep425tags.get_supported()) [('cp37', 'cp37m', 'win_amd64'), ('cp37', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')] >>>
下載對(duì)應(yīng)版本,安裝whl文件
二、如果版本沒(méi)有錯(cuò),那就是wheel沒(méi)有安裝
在cmd命令窗口輸入:pip install wheel
提示Successful后安裝成功,在找到whl文件安裝
總結(jié)
原文鏈接:https://blog.csdn.net/qq_52109814/article/details/124354299
相關(guān)推薦
- 2022-08-28 centos 單機(jī)版redis安裝與數(shù)據(jù)持久化
- 2022-01-08 關(guān)于git操作warning: adding embedded git repository: pp
- 2022-05-15 C++中類(lèi)的轉(zhuǎn)換函數(shù)你了解嗎_C 語(yǔ)言
- 2024-02-27 Go 讀取控制臺(tái)輸入
- 2022-04-17 WPF框架Prism中使用MVVM架構(gòu)_實(shí)用技巧
- 2022-09-20 基于C語(yǔ)言實(shí)現(xiàn)隨機(jī)點(diǎn)名器(附源碼)_C 語(yǔ)言
- 2023-02-09 python如何提取xml指定內(nèi)容_python
- 2022-05-28 Pyinstaller打包Pytorch框架所遇到的問(wèn)題_python
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過(guò)濾器
- Spring Security概述快速入門(mén)
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡(jiǎn)單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支