schriftgestalt / FontMakeExportPlugin

Glyphs export plugin that uses fontmake

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed the first run with "Can't find venv/bin/pip3" error

anthrotype opened this issue · comments

To install the plugin, I cloned it inside "Repositories" directory and made a symbolic link to the "Plugins" folder, like so:

$ cd ~/Library/Application\ Support/Glyphs\ 3/Repositories
$ git clone https://github.com/schriftgestalt/FontMakeExportPlugin
$ ln -s "$HOME/Library/Application Support/Glyphs 3/Repositories/FontMakeExportPlugin/fontMakeExport.glyphsFileFormat" "$HOME/Library/Application Support/Glyphs 3/Plugins/fontMakeExport.glyphsFileFormat"

Then I launched Glyphs.app, and tried to export a simple test variable font, pressing Command-E, selecting the fontmake export tab, keeping the default settings, but then the following error occurred:

Screenshot 2023-11-30 at 10 25 28

The Python version that I have selected in the Settings=>Addons panel is "3.11.6 (Glyphs)", which I presume is the recommended one that comes with Glyphs.app.

Do I need to create the venv myself?

In the Macro panel, I can see that the python3 -m venv command is failing with the following ImportError:

ImportError: dlopen(/Users/clupo/Library/Application Support/Glyphs 3/Repositories/GlyphsPythonPlugin/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/math.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__PyModule_Add'

I can reproduce if I try to run the python3 command inside the GlyphsPythonPlugin from the Terminal.

This is happening on macOS 14.1 on a Macbook Pro with M1 Pro (arm64)

I managed to work around this by downloading and installing the official Python 3.11 for mac from python.org and selected that one from the Settings->Addons panel. After restarting the app, I was able to run the export plugin, it managed to create the venv inside the plugin folder, but then failed to run the fontmake command with another error, cf. #5

This is strange. After I installed the latest Python 3.11.6 from python.org using the official installer, if I now select the Glyphs python from the Glyphs.app Settings (this also happens to be version 3.11.6), the venv module no longer gives that ImportError above but just works.

I think I had another older python 3.11 in the /Library/Frameworks/Python (probably 3.11.1, not sure any more), could it be that that was producing conflicts with the python framework that GlyphsPythonPlugin comes with?

If that's the case, we can probably close this as it was related to my local setup.