我已经下载了 wxGlade-0.7.2.tar.gz,并解压了它的内容。我还安装了 Python3.6、wxPython 和 homebrew。
问题是,当我在 wxGlade-0.7.2 文件夹中运行“python wxglade.py”时,我得到以下输出:
INFO : Starting wxGlade version "0.7.2" on Python 2.7.10
INFO : Base directory: /Users/shihaoheng/Downloads/wxGlade-0.7.2
INFO : Documentation directory: /Users/shihaoheng/Downloads/wxGlade-0.7.2/docs
INFO : Icons directory: /Users/shihaoheng/Downloads/wxGlade-0.7.2/icons
INFO : Build-in widgets directory: /Users/shihaoheng/Downloads/wxGlade-0.7.2/widgets
INFO : Template directory: /Users/shihaoheng/Downloads/wxGlade-0.7.2/templates
INFO : Credits file: /Users/shihaoheng/Downloads/wxGlade-0.7.2/CREDITS.txt
INFO : License file: /Users/shihaoheng/Downloads/wxGlade-0.7.2/LICENSE.txt
INFO : Manual file: /Users/shihaoheng/Downloads/wxGlade-0.7.2/docs/html/index.html
INFO : Tutorial file: /Users/shihaoheng/Downloads/wxGlade-0.7.2/docs/tutorial.html
INFO : Home directory: /Users/shihaoheng
INFO : Application data directory: /Users/shihaoheng/.wxglade
INFO : Configuration file: /Users/shihaoheng/.wxglade/wxgladerc
INFO : History file: /Users/shihaoheng/.wxglade/file_history.txt
INFO : Log file: /Users/shihaoheng/.wxglade/wxglade.log
INFO : Current locale settings are:
INFO : Language code: zh_TW
INFO : Encoding: UTF-8
INFO : Filesystem encoding: utf-8
ERROR : Please install missing Python module "wxversion".
Please install missing Python module "wxversion".
显然,它正在尝试在 Python2.7.10 上安装 glade(我相信我也已经安装了,虽然我不确定如何检查),我想知道错误是否是因为当我安装 wxPython 时,它自动安装到我的 3.6 版本。
会是这样吗?如果是这样,我如何专门将 wxPython 安装到旧版本的 python,以便我停止收到这个“未找到 wxversion”错误?
编辑:没有安装 Python 2.7.13,所以我刚刚安装了它,然后运行“python2.7 wxglade.py”,这给了我和以前一样的错误。我尝试使用 brew 重新安装 wxPython,但收到错误“警告:wxpython 3.0.2.0 已安装”。有没有办法专门将 wxPython 安装到 python 2.7.13 版本之类的?