Home › Forums › Installation › Installing Glade on Mac OS X
- This topic has 13 replies, 3 voices, and was last updated 6 years ago by Keith.
-
AuthorPosts
-
May 7, 2012 at 4:03 pm #281KeithKeymaster
First download from:
https://www.peardrop.co.uk/downloadfiles/glade6_mac_arm64.dmg (64 bit, Python 3)
https://www.peardrop.co.uk/downloadfiles/glade6_mac64.dmg (64 bit, Python 3)
Save the DMG file, 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.
You should not need to edit security settings as Glade is signed and notarized according to Apple policy. You may still get a popup the first time you run, asking if you want to run software downloaded from the internet, but it should tell you that it’s been checked and verified non-malicious.
To set env vars so you can use Glade from the command line, you can edit your ~/.bash_profile and add e.g:
export GLADE_HOME=$HOME/Applications/glade6_mac_arm64 export PYTHONPATH=.:$GLADE_HOME:$PYTHONPATH export PATH=$GLADE_HOME:$PATH
Setting up env vars so you can start Glade from the icon is more complex, as this does not use the shell. The way to do it is to create a file e.g. ~/set_env_vars and use launchctl:
#!/bin/bash # This file is executed during login, and sets up env vars for programs started from their icon launchctl setenv GLADE_HOME $HOME/Applications/glade6_mac_arm64 launchctl setenv PYTHONPATH .:$GLADE_HOME:$PYTHONPATH launchctl setenv PATH $GLADE_HOME:$PATH
To get this file to execute on login, rather than on starting a terminal, go to System Preferences->Users and Groups and select the ‘Login Items’ tab for the user. Add the file e.g. set_env_vars as above.
- This topic was modified 4 years, 3 months ago by Keith.
- This topic was modified 4 years, 1 month ago by Keith.
- This topic was modified 4 years, 1 month ago by Keith.
- This topic was modified 3 years, 10 months ago by Keith.
- This topic was modified 3 years, 10 months ago by Keith.
- This topic was modified 3 years, 10 months ago by Keith.
- This topic was modified 2 years, 6 months ago by Keith.
- This topic was modified 1 year, 4 months ago by Keith.
- This topic was modified 1 year, 4 months ago by Keith.
- This topic was modified 1 year, 4 months ago by Keith. Reason: Added latest changes for .dmg files
- This topic was modified 1 year, 4 months ago by Keith.
- This topic was modified 1 year, 4 months ago by Keith.
- This topic was modified 1 year, 4 months ago by Keith.
- This topic was modified 1 year, 1 month ago by Keith.
- This topic was modified 1 month, 4 weeks ago by Keith.
May 11, 2012 at 5:48 am #1128mguthausParticipantI 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
May 11, 2012 at 9:01 am #1129KeithKeymasterHi 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
May 11, 2012 at 11:48 am #1130KeithKeymasterOne 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.
May 11, 2012 at 5:34 pm #1131mguthausParticipantYes, 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!
December 22, 2012 at 1:50 pm #1292KeithKeymasterOne 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…
May 23, 2017 at 6:18 pm #2036KeithKeymasterA 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.
August 25, 2018 at 2:56 pm #2203geoffatmuseParticipantHello,
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:First download from:https://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).
August 26, 2018 at 2:03 pm #2204KeithKeymasterQuote: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?
August 26, 2018 at 2:59 pm #2205geoffatmuseParticipantI 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:Quote: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?
August 26, 2018 at 4:49 pm #2206KeithKeymasterWhen 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?
August 27, 2018 at 3:06 am #2207geoffatmuseParticipantQuote: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.
August 27, 2018 at 3:17 am #2208KeithKeymasterGlade 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.
August 27, 2018 at 3:21 am #2209KeithKeymasterYou might also find this useful:
-
AuthorPosts
- You must be logged in to reply to this topic.