Glyphs app, python installation and pyobjc

Hey there,
I’m aware of the two issues opened on the forum earlier this year but I can’t seem to find any solution.
I’ve managed to install python and pyobjc in the terminal :
It seems to say
Requirement already satisfied: pyobjc-framework-StoreKit==8.1 in /opt/homebrew/lib/python3.9/site-packages (from pyobjc) (8.1)
for each line.

this

file /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 

oupts out

/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64
- Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64
- Mach-O 64-bit executable arm64]
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 (for architecture x86_64):	Mach-O 64-bit executable x86_64
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 (for architecture arm64):	Mach-O 64-bit executable arm64

Actually when I try

import objc
print(objc)

it shows

Traceback (most recent call last):
  File "<internal>", line 1
ModuleNotFoundError: No module named 'objc'
Traceback (most recent call last):
  File "<macro panel>", line 2
ModuleNotFoundError: No module named 'objc'

but if I run
which python3.9
it doesn’t output arm :
/opt/homebrew/bin/python3.9

I can also select python 3.9 in the python version in glyphs…
but the plugins doesn’t seem to work and each time i launch Glyphs, it tells me to run
pip3 install pyobjc

Thanks for the help

1 Like

What have you selected in Preferences > Addons > Python Version?

Hey,
thanks for the reply.

I selected python 3.9.1

You have several python 3.9 installed. One from the python.org installer and one from homebrew. You should select the ‘Brew’ version in that popup. Or, remove all versions you can find and install only one and make sure that is used everywhere.

Hi there,
I uninstalled all my python versions and installed only 3.10,
however, I can’t seem to be able to select the Python version in the addons menu in Glyphs…
it’s blank.

EDIT :
I reinstalled 3.9.1, after having removed all the other 3.9.1 versions.
Also reinstalled pyobjc.
It’s giving me back the same error, tells me to install pyobjc and also don’t recognize any other python version, like before.

The easiest would be to install the Glyphs-Python from the Plugin Manager. Then restart Glyphs and select it in preferences and restart Glyphs again.

If you like to use a manually installed python, remove them all (again), restart Glyphs and see it they are really gone. Then install the latest version from python.org (v3.10) (make sure that which python3 returns /Library/Frameworks/Python.framework/Versions/3.10/bin/python3) and install pyobjc. Then restart Glyphs and it should show “3.10.5 (python.org)”.

Hi,

So i removed all,
installed Python again, which python3 returns

/Library/Frameworks/Python.framework/Versions/3.9/bin/python3

but I got this error when doing pip3 install pyobjc

  File "/opt/homebrew/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

It seems that pip install pyobjc tries to install the plugin in the homebrew dir instead of the library.
Also, I can’t seem to find the Glyphs-Python extension in Glyphs…

Thanks for the support

Did you really install python 3.9? I doubt that. So you didn’t remove all old versions. Copy this path

/Library/Frameworks/Python.framework/Versions/

In Finder, press Cmd+Shift+G and paste the string. In the resulting finder window, delete all folders (like the “3.9”). Then restart Glyphs and check if it the Python Versions popup is empty. You might have some old version of pip flying around. Can you do “which pip3” and find and remove the resulting file?

The Glyphs-Python is in Window > Plugin Manager > Modules.

Hi,
removed everything, reinstalled python 3.10 from python.org, now I can’t find any python version in the glyphs app.

which python3

returns

/Library/Frameworks/Python.framework/Versions/3.10/bin/python3

and

which pip3 
> /Library/Frameworks/Python.framework/Versions/3.10/bin/pip3

in the glyphs app, after several relaunchs,

just an update:
fixed the issue by updating the app.

1 Like