Zhiming010
Zhiming010

Reputation: 313

Can't install wxGlade on mac

I've download wxGlade-0.7.2.tar.gz, and extracted its contents. I also have Python3.6, wxPython and homebrew installed.

The problem is, when I run "python wxglade.py" in the wxGlade-0.7.2 folder, I get the following output:

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".

Obviously, it is trying to install glade on Python2.7.10 (which I believe I also have installed, though I'm not sure how to check), and I am wondering if the error is because when I installed wxPython, it automatically installed to my 3.6 version.

Could this be the case? If so, how do I install wxPython specifically to the older version of python, so that I stop getting this "wxversion not found" error?

Edit: Python 2.7.13 wasn't installed, so I installed it just now, then ran "python2.7 wxglade.py", which gave me the same exact error as before. I tried reinstalling wxPython with brew, but got the error "Warning: wxpython 3.0.2.0 is already installed". Is there a way to install wxPython specifically to the python 2.7.13 version or something?

Upvotes: 0

Views: 1101

Answers (3)

Dietmar Schwertberger
Dietmar Schwertberger

Reputation: 149

You should switch to a more recent version of wxGlade and probably also wxPython. The current repository version of wxGlade is much nicer to use and supports Python 3. Just clone the repository or download a snapshot from https://bitbucket.org/wxglade/wxglade/get/default.zip

wxPython Phoenix is now available from PyPi: https://pypi.python.org/pypi/wxPython

There's a wxGlade mailing list wxglade-general at Sourceforge.

Regards, Dietmar

Upvotes: 0

Bugs
Bugs

Reputation: 4489

Moved solution from question to answer:

Solution:

Mac Sierra makes this as much a pain in the ass as possible, but I finally put the pieces together for a solution.

Step 1. Download the wxGlade 'tarball' (.tar.gz) file.

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

Step 2. Make sure you have python 2.7 installed (wxGlade will not work with python 3.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.

Step 3. Install 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:

 sudo spctl --master-disable

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!

Step 4. Run 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!

Upvotes: 0

cosinepenguin
cosinepenguin

Reputation: 1575

Since you are running this on a Mac, you can actually just install the package with the Mac OSX binary WXPython provides here!

You probably want the first option (wxPython3.0-osx-carbon-py2.7) since that is for more recent distributions of Mac OS, though so check the documentation to make sure it's the right one.

This should help clean up your environment and make sure dependencies are set up properly.

Hope it helps!

Upvotes: 1

Related Questions