Python version on macOS 10.14 mojave
Hi, I'm trying to get the gtk-mac-bundler running on my MacOS 10.14 (Mojave) box. The gtk-osx-setup.sh and jhbuild bootstrapp stage both seem to run ok, however when I attempt to run the gtk-mac-bundler I get an error which appears related to trying to run python2 code with python3. Here are the steps I took:
git clone https://gitlab.gnome.org/GNOME/gtk-osx.git
cd gtk-osx/
./gtk-osx-setup.sh
export PATH="$PATH:/Users/jhb/.new_local/bin"
jhbuild bootstrap-gtk-osx
jhbuild build meta-gtk-osx-bootstrap meta-gtk-osx-gtk3
At this point I downloaded the gtk-mac-bundler sources using a webbrowser from here.
mv ~/Downloads/gtk-mac-bundler-0.7.4.tar.xz ./
tar xzf gtk-mac-bundler-0.7.4.tar.xz
cd gtk-mac-bundler-0.7.4/
make install
export PATH="$PATH:/Users/jhb/.local/bin"
cd examples/
jhbuild shell
Inside the jhbuild shell, I ran:
export PATH=$PREFIX/bin:~/.local/bin:$PATH
gtk-mac-bundler gtk3-demo.bundle
I get this output:
Traceback (most recent call last):
File "/Users/jhb/.local/bin/gtk-mac-bundler", line 5, in <module>
import bundler.main
File "/Users/jhb/gtk-mac-bundler-0.7.4/bundler/main.py", line 8
print "Usage: %s <bundle descriptopn file>" % (sys.argv[0])
^
SyntaxError: invalid syntax
Other info:
- I have homebrew installed. As per the suggestion on this page, I created a new user and did all of this in a shell as the new user
- My systemwide default python (
/usr/bin/python
) is version 2.7. I have a command python3 on PATH at/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
, version is3.7.3
. I'm not sure if this is standard on mac (I'm not really a mac person) - I saw the suggestion in #33 (closed) to run
jhbuild build python3
- I did this, and tried to rerungtk-mac-bundler
in a new jhbuild shell, but got the same result.
Any suggestions for getting this working?
Edited by Drew Holzworth