wxpython在python 3.X下的安装方法

来源:互联网 发布:php框架有哪些 编辑:程序博客网 时间:2024/05/18 19:43
wxpython在python 3.X下变成了wxpython ProjectPhoenix项目,其官方主页在[wxpython ProjectPhoenix](https://wiki.wxpython.org/ProjectPhoenix"wxpython ProjectPhoenix官方主页")网址为https://wiki.wxpython.org/ProjectPhoenix 。换句话说,若想在python 3.X版本下使用wxpython,就必须安装wxpython ProjectPhoenix。小编在已经有python2的wxpython情况下,发现使用pip安装需要在python3.X为主的Windows cmd命令行下才能安装。小编同时安装了anaconda 2和 anaconda 3。在这种情况下,需要进入anaconda3的目录下运行Windows CMD命令行。否则,使用pip进行安装会报错。

cmd 命令行

然后才能运行pip命令进行安装。以下是运用pip命令进行安装wxpython ProjectPhoenix的方法。- 找到合适的安装版本安装文件下载地址:https://wxpython.org/Phoenix/snapshot-builds/![wxpython Phoenix安装版本](http://img.blog.csdn.net/20160715183704479)

其中,文件命名规则请参考以下引用文字:

File naming conventions:

  • Files with the “*.whl” extension are binary wheel files (https://wheel.readthedocs.org/en/latest/). See below for more info.

  • Files with the “*.tar.gz” extension are compressed tar archives of the Phoenix and wxWidgets source code.

  • The “-docs-.tar.gz” files are compressed archives of the documentation.

For example:
wxPython_Phoenix-3.0.3.dev1549+fa6f31f-cp33-cp33m-macosx_10_6_intel.whl

means:
- This is the wxPython_Phoenix package
- It is version 3.0.3.dev1549+fa6f31f (a development version, with
the build number derived from the source control system.)
- It is built for CPython version 3.3
- It is built for the macosx operating system
- It is built for OSX version 10.6 or greater
- It is built for Intel processors.

- 安装命令根据wxPython Phoenix Snapshot Builds文件1在Windows CMD命令符下,输入以下命令。
pip install https://wxpython.org/Phoenix/snapshot-builds/(此处添加以上版本截图文件名)
比如,需要安装python3.5的wxpython版本:

cmd截图2

运行以上命令,就可以安装python 3.X版本的wxpython了。注:使用wxpython Phoenix API的手册都在文中wxpython Phoenix下载地址中的tar.gz压缩包中。

  1. wxPython Phoenix Snapshot Builds网址:https://wxpython.org/Phoenix/snapshot-builds/README.txt ↩
0 0
原创粉丝点击