Python安装whl文件之坑「建议收藏」
大家好,又见面了,我是你们的朋友全栈君。
有的时候,使用pip install xxx会失败,这个时候我们就需要下载xxx.whl文件,而xxx.whl在版本上有很多不兼容的地方需要注意
1.whl文件兼容性很差,同一文件分版本
具体下载哪一个版本?
可在pythonIDE中输入
import pip;
print(pip.pep425tags.get_supported())
(pip 10没有pep425tags()这个属性,可以考虑使用,python -m pip install –upgrade pip==9.0.3回退)
查看可以获取到pip支持的文件名还有版本
在我的机器下输出
[(‘cp36’, ‘cp36m’, ‘win_amd64’), (‘cp36’, ‘none’,’win_amd64′), (‘py3’, ‘none’, ‘win_amd64’), (‘cp36’, ‘none’, ‘any’), (‘cp3′,’none’, ‘any’), (‘py36’, ‘none’, ‘any’), (‘py3’, ‘none’, ‘any’), (‘py35′,’none’, ‘any’), (‘py34’, ‘none’, ‘any’), (‘py33’, ‘none’, ‘any’), (‘py32′,’none’, ‘any’), (‘py31’, ‘none’, ‘any’), (‘py30’, ‘none’, ‘any’)]
whl文件大集合网址:https://www.lfd.uci.edu/~gohlke/pythonlibs
(注:如在上面没有找到所需的whl文件,可去该第三方库的官网下载)
假设我要下载wxPython的whl文件
于是我就下载这
wxPython-cp36-cp36mwin_amd64.whl
然后在命令行下进入whl文件所在目录,
pip install xxx.whl
2.在安装wxPython.whl的时候还发现,
[(‘cp35’, ‘none’, ‘win_amd64’), (‘py3’, ‘none’,’win_amd64′), (‘cp35’, ‘none’, ‘any’), (‘cp3’, ‘none’, ‘any’), (‘cp34’, ‘none’,’any’), (‘cp33’, ‘none’, ‘any’), (‘cp32’, ‘none’, ‘any’), (‘cp31’, ‘none’,’any’), (‘cp30’, ‘none’, ‘any’), (‘py35’, ‘none’, ‘any’), (‘py3’, ‘none’,’any’), (‘py34’, ‘none’, ‘any’), (‘py33’, ‘none’, ‘any’), (‘py32’, ‘none’,’any’), (‘py31’, ‘none’, ‘any’), (‘py30’, ‘none’, ‘any’)]
根本没有符合上述版本的wxPython.whl
因为这是pip 7,需要python -m pip install –upgradepip==9.0.3 到pip9,总而言之,pip9是最好的!!!
3.pip/python安装路径最好不要有中文,如果有的话,使用pip命令可能会显示编码错误,而python3又没有setDefaultencoding()方法,罢了罢了,不用中文
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/139387.html原文链接:https://javaforall.cn
相关文章
- pycharm只能安装在c盘吗_pycharm自带python吗
- python第三方库的安装方法有哪些_如何安装python的第三方库
- ubuntu用pip离线安装python第三方库
- python——初识python(安装pycharm和ipython)
- python pip手动安装二进制包
- 利用python pip以及pyCharm安装requests第三方库「建议收藏」
- linux golang环境安装_python环境搭建
- pycharm配置opencv-Python_pycharm环境安装
- Python与Pycharm安装包
- pycharm安装opencv-python_pycharm opencv
- python怎么安装matplotlib.pyplot_python安装matplotlib模块
- pycharm opencv安装_pycharm自带python
- python安装dlib库_pycharm安装dlib失败
- Python安装第三方库(离线+在线)
- pycharm安装程序包_Python不可以安装的软件包
- pycharm的python环境配置_怎么安装pycharm及环境变量配置
- node npm python 环境配置、安装
- python安装包代码_linux编译程序
- Python 安装 【Pycharm interpreter field is empty(解释器为空)】
- pycharm安装no interpreter_no python interpreter configured