离线安装wxpython
离线安装wxpython
前言
由于工作环境,我的工作机是在离线环境下的,没法连接外网。但是自己又想学习一下wxpython,只好自己手动离线安装,本来以为很简单的,但是实际上。。。一言难尽。
基本环境:python pip easy_install
安装python2.7
直接下载msi数据包安装,如果无法识别安装,那么:
1、确定msi数据包的完整性,包括大小、格式;
2、确定开启开启windows installer:win + R --> 输入Services.msc --> 找到windows installer --> 左侧手动启用
python3.X 安装更为简单,直接双击.exe文件安装即可,且都需要选定添加环境变量。
安装wxpython
1、下载
下载地址:https://pypi.org/project/wxPython/4.0.1/#files
选择对应的文件进行安装,我的选择是: wxPython-4.0.1-cp27-cp27m-win_amd64.whl
其中:
cp27 表示 python2.7
win_amd64 表示 windows 64位
在这之外:win32 表示 32位 。
2、安装
将下载好的wxpython**.whl文件转移到python安装路径下的Scripts目录下,我的是:C:\Python27\Scripts
然后打开cmd或者powershell,切换到该目录下:
PS C:\User\Yanta> cd C:\Python27\Scripts
执行命令 pip install wxPython-4.0.1-cp27-cp27m-win_amd64.whl ,此时会报错:wxPython-4.0.1-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform. 。
PS C:\Python27\Scripts> pip install .\wxPython-4.0.1-cp27-cp27m-win_amd64.whl
wxPython-4.0.1-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
此时可以尝试使用easy_install安装,结果提示缺少 six 包。
PS C:\Python27\Scripts> .\easy_install-2.7.exe .\wxPython-4.0.1-cp27-cp27m-win_amd64.whl
Processing wxPython-4.0.1-cp27-cp27m-win_amd64.whl
c:\python27\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
c:\python27\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
c:\python27\lib\site-packages\setuptools\pep425tags.py:99: RuntimeWarning: Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect
sys.version_info < (3, 3))) \
Installing wxPython-4.0.1-cp27-cp27m-win_amd64.whl to c:\python27\lib\site-packages
writing requirements to c:\python27\lib\site-packages\wxPython-4.0.1-py2.7-win-amd64.egg\EGG-INFO\requires.txt
Adding wxPython 4.0.1 to easy-install.pth file
Installing wxdemo-script.py script to c:\python27\Scripts
Installing wxdemo.exe script to c:\python27\Scripts
Installing img2png-script.py script to c:\python27\Scripts
Installing img2png.exe script to c:\python27\Scripts
Installing pyslices-script.py script to c:\python27\Scripts
Installing pyslices.exe script to c:\python27\Scripts
Installing img2py-script.py script to c:\python27\Scripts
Installing img2py.exe script to c:\python27\Scripts
Installing pyslicesshell-script.py script to c:\python27\Scripts
Installing pyslicesshell.exe script to c:\python27\Scripts
Installing wxget-script.py script to c:\python27\Scripts
Installing wxget.exe script to c:\python27\Scripts
Installing helpviewer-script.py script to c:\python27\Scripts
Installing helpviewer.exe script to c:\python27\Scripts
Installing pyshell-script.py script to c:\python27\Scripts
Installing pyshell.exe script to c:\python27\Scripts
Installing pycrust-script.py script to c:\python27\Scripts
Installing pycrust.exe script to c:\python27\Scripts
Installing wxdocs-script.py script to c:\python27\Scripts
Installing wxdocs.exe script to c:\python27\Scripts
Installing pywxrc-script.py script to c:\python27\Scripts
Installing pywxrc.exe script to c:\python27\Scripts
Installing img2xpm-script.py script to c:\python27\Scripts
Installing img2xpm.exe script to c:\python27\Scripts
Installed c:\python27\lib\site-packages\wxpython-4.0.1-py2.7-win-amd64.egg
Processing dependencies for wxPython==4.0.1
Searching for six
Reading https://pypi.python.org/simple/six/
Download error on https://pypi.python.org/simple/six/: [Errno 11004] getaddrinfo failed -- Some packages may not be found!
Couldn't find index page for 'six' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 11004] getaddrinfo failed -- Some packages may not be found!
No local packages or working download links found for six
error: Could not find suitable distribution for Requirement.parse('six')
然后安装 six ,下载地址:https://pypi.org/project/six/#files
选择 six-1.11.0-py2.py3-none-any.whl ,一样拷贝到C:\Python27\Scripts下,使用pip安装:
PS C:\Python27\Scripts> .\easy_install-2.7.exe .\six-1.11.0-py2.py3-none-any.whl
Processing six-1.11.0-py2.py3-none-any.whl
c:\python27\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
c:\python27\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
c:\python27\lib\site-packages\setuptools\pep425tags.py:99: RuntimeWarning: Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect
sys.version_info < (3, 3))) \
Installing six-1.11.0-py2.py3-none-any.whl to c:\python27\lib\site-packages
Adding six 1.11.0 to easy-install.pth file
Installed c:\python27\lib\site-packages\six-1.11.0-py2.7.egg
Processing dependencies for six==1.11.0
Finished processing dependencies for six==1.11.0
此时再次使用easy_install安装wxpython即可:
PS C:\Python27\Scripts> .\easy_install-2.7.exe .\wxPython-4.0.1-cp27-cp27m-win_amd64.whl
Processing wxPython-4.0.1-cp27-cp27m-win_amd64.whl
c:\python27\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
c:\python27\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
c:\python27\lib\site-packages\setuptools\pep425tags.py:99: RuntimeWarning: Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect
sys.version_info < (3, 3))) \
removing 'c:\python27\lib\site-packages\wxPython-4.0.1-py2.7-win-amd64.egg' (and everything under it)
Installing wxPython-4.0.1-cp27-cp27m-win_amd64.whl to c:\python27\lib\site-packages
writing requirements to c:\python27\lib\site-packages\wxPython-4.0.1-py2.7-win-amd64.egg\EGG-INFO\requires.txt
wxPython 4.0.1 is already the active version in easy-install.pth
Installing wxdemo-script.py script to c:\python27\Scripts
Installing wxdemo.exe script to c:\python27\Scripts
Installing img2png-script.py script to c:\python27\Scripts
Installing img2png.exe script to c:\python27\Scripts
Installing pyslices-script.py script to c:\python27\Scripts
Installing pyslices.exe script to c:\python27\Scripts
Installing img2py-script.py script to c:\python27\Scripts
Installing img2py.exe script to c:\python27\Scripts
Installing pyslicesshell-script.py script to c:\python27\Scripts
Installing pyslicesshell.exe script to c:\python27\Scripts
Installing wxget-script.py script to c:\python27\Scripts
Installing wxget.exe script to c:\python27\Scripts
Installing helpviewer-script.py script to c:\python27\Scripts
Installing helpviewer.exe script to c:\python27\Scripts
Installing pyshell-script.py script to c:\python27\Scripts
Installing pyshell.exe script to c:\python27\Scripts
Installing pycrust-script.py script to c:\python27\Scripts
Installing pycrust.exe script to c:\python27\Scripts
Installing wxdocs-script.py script to c:\python27\Scripts
Installing wxdocs.exe script to c:\python27\Scripts
Installing pywxrc-script.py script to c:\python27\Scripts
Installing pywxrc.exe script to c:\python27\Scripts
Installing img2xpm-script.py script to c:\python27\Scripts
Installing img2xpm.exe script to c:\python27\Scripts
Installed c:\python27\lib\site-packages\wxpython-4.0.1-py2.7-win-amd64.egg
Processing dependencies for wxPython==4.0.1
Finished processing dependencies for wxPython==4.0.1
3、测试
安装过后测试一下,是否可以导入wx包:
PS C:\Python27\Scripts> py -2
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
4、NOTE
本机安装有python2.7和3.6两个版本,使用py -2 和py -3分别指向2.7和3.6,在python脚本中使用:
#!/user/bin/env python2
#!/user/bin/env python3
分别指定即可。
离线安装wxpython的更多相关文章
- 如何离线安装python的whl库
对于使用公司内网环境办公的人来说,可能无法使用pip install 命令安装python的whl库.对于这种情况,我们可以用以下的方法安装一个whl库. 1 下载whl文件,下载时注意,whl文件的 ...
- SharePoint 2016 必备组件离线安装介绍
前言 SharePoint 必备组件安装,一直以来都是SharePoint安装过程中的最大的坑,尤其是不能联网的服务器.博主在这里简单介绍一下离线安装过程,并附组件包下载以及安装命令,并且在windo ...
- MYSQL离线安装
由于MySQL的广泛应用,MySQL的安装也就成了大家经常会碰到的问题.并且由于不是所有机器都可连接外网,所以MySQL的离线安装显得比较重要.而本文旨在介绍CentOS6.6下离线安装MySQL. ...
- VS2010+Qt5.4.0 环境搭建(离线安装)
原创作者:http://blog.csdn.net/solomon1558/article/details/44084969 前言 因项目需要Qt开发GUI,我根据网上资料及自己的经验整理了搭建vs2 ...
- 离线安装 Python 2.7, paramiko 和 tornado
无非就是离线安装, 步骤比较繁琐, 记录一下. 需求很简单, 一个离线安装的 Python, 能跑 tornado 和 paramiko 1. 离线安装 Python 2.7 .tgz cd Pyth ...
- npm包与gem包--在线&离线安装
目录 NPM 在线 离线 GEM 在线 离线 NPM NPM,即为Node的包管理工具,官网为 https://www.npmjs.com/,我们可以在站内搜索所需要的NPM包,了解相关的使用规则 安 ...
- Windows 8 下离线安装。net Framework 3.5
Windows 8 下安装.net Framework 3.5 1)可以将直接双击ISO (或放入光盘/U盘)(安装文件在F盘) 2)使用管理员权限运行命令行程序 3)dism.exe /online ...
- Xamarin Mono For Android 4.6.07004 完整离线安装破解版(C#开发Android、IOS工具)
Xamarin是由Miguel de Icaza成立的一家新的独立公司,目的是给Mono一个继续奋斗的机会.Mono for Android (原名:MonoDroid)可以让开发人员使用 Mic ...
- nexus离线安装索引及一些问题
安装私服~~~ 整体流程: 服务器安装私服 配置私服(主要是安装索引) 本地maven配置指向私服 安装私服 win & linux 网上教程很多,不在阐述: 配置私服(及安装index) 1 ...
随机推荐
- BZOJ - 4066 KD树 范围计数 暴力重构
题意:单点更新,大矩阵(\(n*n,n≤10^5\))求和 二维的KD树能使最坏情况不高于\(O(N\sqrt{N})\) 核心在于query时判断当前子树维护的区间是否有交集/当前子节点是否在块中, ...
- UESTC - 878
状态的枚举还需多多练习啊 #include<iostream> #include<algorithm> #include<cstdio> #include<c ...
- git——合并分支
A将自己的本地代码提交到远程A分支,此时master主干上有B新提交的代码,如果此时A把自己的代码merge到主干,会有冲突,那怎么办? 1.A将自己的代码提交到自己的A分支 2.git fetch ...
- http请求报头和响应报头(1)
1.web端不可避免的http缓存机制,要理解缓存机制,先来了解下http的请求报文和响应报文的内容 2.请求报文 2.1请求行 请求行三部分组成:请求方法.URL以及版本协议 请求的方法有G ...
- springboot+Zookeeper+Dubbo入门
最近想学习dubbo,就利用周末写了一个特别简单的demo,不知道有没有用,先记录一下. 1.安装zookeeper并启动(安装看我上一篇博客https://www.cnblogs.com/huang ...
- journalctl 中文手册
版权声明 本文译者是一位开源理念的坚定支持者,所以本文虽然不是软件,但是遵照开源的精神发布. 无担保:本文译者不保证译文内容准确无误,亦不承担任何由于使用此文档所导致的损失. 自由使用:任何人都可以自 ...
- (转)通过shell脚本实现批量添加用户和设置随机密码以及生产环境如何批量添加
通过shell脚本实现批量添加用户和设置随机密码以及生产环境如何批量添加 原文:http://www.21yunwei.com/archives/4773 有一个朋友问我如何批量创建用户和设置密码 , ...
- Tomcat配置自定义访问日志 --- 获取请求头部信息
使用tomcat,搭建完个人网站后,默认记录来访游客的信息是十分有限的,主要有ip和路径以及方法等. 有时候为了获取更多来访信息,比如请求的头部信息,这个时候就需要我们手动配置log了. 开始 进入T ...
- 飞檐走壁navMesh
http://www.manew.com/thread-106030-1-1.html
- 121、Django rest framework入门使用
框架介绍 为你的django平台通过model生成对应的restfull api,并可以通过对应的http接口来进行 post .get.put.delete等操作.本文是也并非入门级别,不会带你去了 ...