Welcome Guest. Please Login or Register  


You are here: Index > Glade Forum > Installation > Topic : Installing Glade on Mac OS X



Threaded Mode | Print  

 Installing Glade on Mac OS X (13 Replies, Read 316 times)
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
First download from:

http://www.peardrop.co.uk/glade/glade4_mac64.tar.gz (64 bit only)

Unzip/untar to a directory of choice, then follow the instructions in the README.txt file. Note that for the embedded Python interpreter to work correctly you MUST set the env var PYTHONPATH to the directory where glade is installed, so it can find the ui.py module. The env var GLADE_HOME is recommended but not essential; Glade will attempt to locate the online html docs based on the app's location if this is not set.

NB prior to version 4.2.4, Glade was built with ActiveState Python. This caused several problems if you just tried to use the version of Python which comes with the Mac (thank you to the users who reported this!). So as of 4.2.4, Glade is linked to the Mac python (currently version 2.7).
IP: --   

Installing Glade on Mac OS X
mguthaus
Group: Member
Post Group: Newbie
Posts: 6
Status:
I have OSX Snow Leopard and have hesitated to upgrade to Lion. Is there any reason this shouldn't work with Snow Leopard? I tried (but not very hard) and get an error:

"glade cannot be opened because of a problem."

Very specific.  :xd:

Thanks,

Matt

IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
Hi  Matt,

Any more info or error messages to debug this? I am building on Lion, but alas have no means to build or test on older versions of the OS. From what I was led to believe by the Trolltech/Nokia/Digia folks, this would be compatible (from a Qt point of view) with OS's from 10.5 onwards.

cheers

Keith
IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
One thing worth checking is the version of Python on your Mac. Glade was built linked to version 2.7, it's possible you have an older version and that is causing a problem.
IP: --   

Installing Glade on Mac OS X
mguthaus
Group: Member
Post Group: Newbie
Posts: 6
Status:
Yes, it was a Python version problem. I was getting this error:


May 11 10:24:28 otaku [0x0-0x27027].com.peardrop.glade[426]: dyld: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python

but after installing 2.7 from python.org it works fine. Thanks!

IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
One other thing to watch out for on the Mac. If you have Qt libraries installed on your machine, and they are defined in the DYLD_LIBRARY_PATH environment variable, and they are of a different version to the ones shipped with the glade.app bundle, then you will most likely get a crash if you try and run Glade from the command line rather than click on it in the Finder.

The reason is that when clicked on with the Finder, OSX environment variables are ignored by the app, which looks for and finds the Qt libs in the .app bundle.

When run from the command line, the executable knows nothing about the .app bundle libs, and looks at DYLD_LIBRARY_PATH instead. And if e.g. you have Qt 4.8.2 on your system, but Glade was compiled with 4.8.6, it will print an error message to the terminal and die...


Edited by Keith : September 17, 2014, 2:49 pm
IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
A nasty bug has been fixed in 4.6.4 that caused some shortcut keys (bindkeys) not to work on the Mac. This is actually a bug in Qt itself... the Qt folks have been notified.
IP: --   

Installing Glade on Mac OS X
geoffatmuse
Group: Member
Post Group: Newbie
Posts: 3
Status:
Hello,

I wonder, is it possible for to link Glade to the subsequently installed Python, in this case 2.7.15, and its accompanying 3rd party modules, instead of linking to the MAC OS system Python.

Quote From : Keith May 7, 2012, 4:03 pm
First download from:

http://www.peardrop.co.uk/glade/glade4_mac64.tar.gz (64 bit only)

Unzip/untar to a directory of choice, then follow the instructions in the README.txt file. Note that for the embedded Python interpreter to work correctly you MUST set the env var PYTHONPATH to the directory where glade is installed, so it can find the ui.py module. The env var GLADE_HOME is recommended but not essential; Glade will attempt to locate the online html docs based on the app's location if this is not set.

NB prior to version 4.2.4, Glade was built with ActiveState Python. This caused several problems if you just tried to use the version of Python which comes with the Mac (thank you to the users who reported this!). So as of 4.2.4, Glade is linked to the Mac python (currently version 2.7).
IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
Quote From : geoffatmuse August 25, 2018, 2:56 pm
Hello,
I wonder, is it possible for to link Glade to the subsequently installed Python, in this case 2.7.15, and its accompanying 3rd party modules, instead of linking to the MAC OS system Python.


Glade is built with the current Python version (in my case it is 2.7.10) but will use the site libraries of your installation, depending where PYTHONPATH is set to. 

Is there a particular issue you are encountering that is causing a problem with the default site libraries?
IP: --   

Installing Glade on Mac OS X
geoffatmuse
Group: Member
Post Group: Newbie
Posts: 3
Status:
I believe I am encountering a compatibility issue between python 2.7.10 and the python requests library with python 2.7.15. I have set PYTHONPATH to the python 2.7.15 directory and that is all working swimmingly.

However, I receive a "ImportError: cannot import name _remove_dead_weakref" when I open Glade from the command line - "open glade.app". Interestingly, I've just realized that I do not receive this error when opening Glade from Finder.


Quote From : Keith August 26, 2018, 2:03 pm
Quote From : geoffatmuse August 25, 2018, 2:56 pm
Hello,
I wonder, is it possible for to link Glade to the subsequently installed Python, in this case 2.7.15, and its accompanying 3rd party modules, instead of linking to the MAC OS system Python.


Glade is built with the current Python version (in my case it is 2.7.10) but will use the site libraries of your installation, depending where PYTHONPATH is set to. 

Is there a particular issue you are encountering that is causing a problem with the default site libraries?
IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
When opening from the command line, you get the environment variables set in your .bash_profile. And presumably this is where you are setting PYTHONPATH.

Any reason why you have a 2.7.15 installation - the current version for an up to date MacOS is 2.7.10?
IP: --   

Installing Glade on Mac OS X
geoffatmuse
Group: Member
Post Group: Newbie
Posts: 3
Status:
Quote From : Keith August 26, 2018, 4:49 pm
When opening from the command line, you get the environment variables set in your .bash_profile. And presumably this is where you are setting PYTHONPATH.

Any reason why you have a 2.7.15 installation - the current version for an up to date MacOS is 2.7.10?


I am fairly certain that I could use 2.7.10 for my Glade scripts. However, my preference is not to develop using the Mac system installed Python. I believe the issues I am experiencing are the result of a conflict between Glade using the system installed Python and my script importing and using python libraries that are in a standard python installation. So I think the fix would be for me to either use the Python that shipped with my Mac for my Glade scripts or be able to configure Glade to use the standard python installation instead of the system installed Python that comes with the OS.

Is my understanding correct that Glade is linked to the Mac system python installation and there is no way to configure Glade to have it use a different python installation?

Thanks for your inputs. I really appreciate it.
IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
Glade is linked to the system libs for its embedded python :

Keiths-MBP:MacOS keith$ otool -L glade
glade:
    /System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.10)

I believe you can control the framework search path using the env var DYLD_FRAMEWORK_PATH if you want it to pick up a non-standard python framework?

Then the module load path (sys.path) is set using the env var PYTHONPATH.
IP: --   

Installing Glade on Mac OS X
Keith
Group: Moderator
Post Group: Super Member
Posts: 841
Status:
You might also find this useful:

https://superuser.com/questions/282450/where-do-i-set-dyld-libra ry-path-on-mac-os-x-and-is-it-a-good-idea

IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is September 21, 2018, 10:45 am.

  Powered By AEF 1.0.9 © 2007-2011 Electron Inc.Queries: 12  |  Page Created In:0.031