无法在m上安装wxGlade

2024-09-29 19:19:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经下载了wxGlade-0.7.2。焦油gz,并提取其内容物。我还安装了Python3.6、wxPython和自制程序。在

问题是,当我运行“python”时wxglade.py“在wxGlade-0.7.2文件夹中,我得到以下输出:

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 not found”错误了?在

编辑:python2.7.13没有安装,所以我刚刚安装了它,然后运行了“python2.7”wxglade.py“,这给了我和以前一样的错误。我尝试用brew重新安装wxPython,但得到错误消息“警告:wxPython 3.0.2.0已经安装”。有没有一种方法可以将wxPython专门安装到python2.7.13版本或其他版本?在


Tags: 版本infotxtdocsdownloadshtml错误wxpython
3条回答

您应该切换到wxGlade和wxPython的更新版本。 wxGlade当前的存储库版本使用起来更好,并且支持python3。 只需克隆存储库或从https://bitbucket.org/wxglade/wxglade/get/default.zip下载快照

wxpythonphoenix现在可以从PyPi获得:https://pypi.python.org/pypi/wxPython

在Sourceforge有一个wxGlade邮件列表wxGlade general。在

谨致问候, 迪特玛

因为您是在Mac上运行的,所以您实际上只需安装带有macosx二进制文件WXPython提供的here的包!在

您可能需要第一个选项(wxPython3.0-osx-carbon-py2.7),因为这是针对macos的最新发行版的,所以请查看文档以确保它是正确的。在

这将有助于清理您的环境并确保正确设置依赖关系。在

希望有帮助!在

将解决方案从问题转移到答案:

解决方案:

麦克塞拉让这件事尽可能的让人头疼,但我终于把所有的事情都拼在一起找到了一个解决方案。在

第1步。下载wxGlade'tarball'(。焦油gz)文件。在

Just download it from here, and extract it. Then, rename the folder 'wxGlade', and put it in your 'Applications' folder.

第2步。确保安装了Python2.7(wxGlade不能与Python3.5一起工作)。在

Click here and the 2.7.13 python pkg file will begin downloading. It is signed, so you should be able to install it without issues (otherwise, skip ahead to the step to enable installing unsigned pkg files).

Once it is finished, you can confirm it has been installed by entering the following into terminal:

 which python2

If it is indeed installed, it will return a directory. If not, it won't return anything.

步骤3。安装wxPython。在

The first thing you need to do is force Sierra (or El Capitan) to let you run unsigned package files. To do this, just open up terminal, and enter:

^{pr2}$

The installation is a real pain in the ass on Sierra, because all of the binaries on the wxPython page no longer work - even the one of the exact same name and version of the binary I'm about to link you to: here. So although this is called 'cocoa-py2.7.dmg', the cocoa-py2.7.dmg available on the website will always fail, giving you the error message 'The installer could not install the software because there was no software found to install.'

Ranting aside, just follow that link, download the special version of cocoa-y2.7.dmg, and then run and install it. Finally, you have wxPython!

第4步。运行wxGlade

Use terminal to change directories (cd) to the extracted tar folder. If you renamed the extracted folder to 'wxGlade' and put it in your applications folder, you can do so instantly by entering the following command:

 cd /Applications/wxGlade

Once you have done so, enter the following run command into terminal:

 python2.7 wxglade.py

(It won't work if have python 3.5 and just type 'python wxglade.py').

Finally, wxGlade should be running!

相关问题 更多 >

    热门问题