Python中 whl包、tar.gz包的区别详解
作者:天兰之珠 时间:2021-08-24 18:58:41
1.whl包
whl格式本质上是一个压缩包,里面包含了py文件,以及经过编译的pyd文件。使得可以在不具备编译环境的情况下,选择适合自己的python环境进行安装。
一般whl包的命名都很长,我们看下具体的含义,举个栗子:
rknn_toolkit-1.7.1-cp36-cp36m-win_amd64.whl
其中,rknn_toolkit是文件名,cp36指的是对应的python版本,cp36就是python3.6,同理,cp37就是python3.7,win指操作系统为windows,amd指64位
2 安装 .whl库包文件
有时直接使用pip下载也比较慢,可以去Pypi官网下载.whl库包
或.tar.gz库包
文件,然后再安装
package_name.whl
库包是已经编译过的,因此可以直接使用pip进行安装
:
pip install 文件名.whl
前题是cmd指令进入到.whl文件所在的路径,然后执行以上的命令
3 tar.gz包
源文件,压缩并打包在一起,还没有编译
安装:
下载—> 解压 —> cd到文件路径 —> 执行命令: python setup.py install
建议:
如果环境挺充足,可以用tar包或者tar.gz包;
如果环境欠缺,比如缺少某些编译环境,或者想要快速且稳定,可以考虑whl包;
一般网络好的情况下,直接pip在线安装了… 但是有些时候没有编译环境,就得用whl包。
来源:https://blog.csdn.net/u012693479/article/details/126369494
标签:Python,whl包,tar.gz包
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
对Tensorflow中tensorboard日志的生成与显示详解
2023-07-19 20:00:44
![](https://img.aspxhome.com/file/2023/7/87547_0s.jpg)
网页设计经验谈
2007-10-30 13:11:00
无法远程登入MySQL数据库的几种解决办法
2012-04-13 11:57:41
浅谈python opencv对图像颜色通道进行加减操作溢出
2021-12-26 11:45:23
![](https://img.aspxhome.com/file/2023/3/99473_0s.jpg)
python 基于selenium实现鼠标拖拽功能
2022-10-30 17:03:07
Pytorch中的 torch.distributions库详解
2021-05-17 22:26:47
![](https://img.aspxhome.com/file/2023/1/84081_0s.png)
python实现经纬度采样的示例代码
2021-12-25 13:24:37
![](https://img.aspxhome.com/file/2023/7/90847_0s.png)
Python3.5面向对象编程图文与实例详解
2023-12-04 23:21:51
![](https://img.aspxhome.com/file/2023/8/88008_0s.png)
python软件都是免费的吗
2022-09-04 03:45:53
python 实现手机自动拨打电话的方法(通话压力测试)
2021-03-19 08:10:34
解决pyinstaller打包exe文件出现命令窗口一闪而过的问题
2021-09-28 01:03:45
![](https://img.aspxhome.com/file/2023/6/107476_0s.jpg)
Python使用matplotlib实现的图像读取、切割裁剪功能示例
2021-12-14 11:04:49
![](https://img.aspxhome.com/file/2023/7/114637_0s.png)
无刷新dropdownlist并进行关联(js+xml)
2007-09-23 12:13:00
详解pandas.DataFrame.plot() 画图函数
2021-06-02 21:41:49
![](https://img.aspxhome.com/file/2023/1/97301_0s.png)
Elasticsearch属性单词常用解析说明
2023-06-12 14:47:36
Python实现PS滤镜Fish lens图像扭曲效果示例
2022-02-01 05:25:02
![](https://img.aspxhome.com/file/2023/5/104935_0s.jpg)
ASP获取ACCESS数据库表名及结构的代码
2011-04-15 10:50:00
Python爬取求职网requests库和BeautifulSoup库使用详解
2021-12-29 09:07:49
![](https://img.aspxhome.com/file/2023/5/93465_0s.jpg)
详解python做UI界面的方法
2023-05-24 08:07:41
![](https://img.aspxhome.com/file/2023/0/105590_0s.png)
python中startswith()和endswith()的用法详解
2023-11-02 12:41:09