Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anthrotype opened this issue Nov 30, 2023 · 3 comments
Open

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

anthrotype opened this issue Nov 30, 2023 · 3 comments

Comments

@anthrotype
Copy link
Contributor

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?

@anthrotype
Copy link
Contributor Author

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)

@anthrotype
Copy link
Contributor Author

anthrotype commented Nov 30, 2023

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

@anthrotype
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant