thierryc
(Thierry Charbonnel)
April 26, 2024, 5:46pm
1
Hello,
I have Python 3 home-brew installed but not listed in the settings.
Python 3.12.3 (main, Apr 9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
/opt/homebrew/bin/python3
I have followed the tutorial on this page.
Do I miss something?
I have try to uninstall and install python module…
TIA for your help.
my Glyphs Version
Any reason you can’t use the Glyphs python? If it is not working, remove it from the Repositories folder and install it again in the plugin manager.
thierryc
(Thierry Charbonnel)
April 26, 2024, 6:53pm
3
To install easing_functions for this script.
from GlyphsApp import *
from easing_functions import *
class NodeAnimator:
def __init__(self, glyph_name=None):
self.font = Glyphs.font
# Defaults
self.size = 0.5
self.fill_colour = (1, 1, 1)
self.handle_size = 8
self.shape = "oval"
self.stroke_width = 0.5
self.remove_overlap = True
self.page_width = 1000
self.page_height = 1000
This file has been truncated. show original
SCarewe
(Sebastian Carewe)
April 26, 2024, 7:08pm
4
Honestly no idea how I managed to set up easing_functions for that, but if all else fails, you can simply copy the easing function code from the original library, it’s not complicated at all. A two- or even one-liner, if I recall correctly.
thierryc
(Thierry Charbonnel)
April 26, 2024, 7:46pm
5
By the way… I also have a strange error in the Drawbot console too.
I will try to restart from a fresh install.
Error 'objc.python_selector' object has no attribute 'replace'
Traceback (most recent call last):
File "/Users/thierryc/Library/Application Support/Glyphs 3/Repositories/DrawBotGlyphsPlugin/DrawBot.glyphsPlugin/Contents/Resources/DrawBotWindow.py", line 170, in runCode
ScriptRunner(code, path, namespace=namespace, stdout=self.stdout, stderr=self.stderr)
File "/Users/thierryc/Library/Application Support/Glyphs 3/Repositories/DrawBotGlyphsPlugin/DrawBot.glyphsPlugin/Contents/Resources/drawBot/scriptTools.py", line 155, in ScriptRunner
source = text.replace('\r\n', '\n').replace('\r', '\n')
^^^^^^^^^^^^
AttributeError: 'objc.python_selector' object has no attribute 'replace'
-- Error/
thierryc
(Thierry Charbonnel)
April 26, 2024, 7:47pm
6
My Mac Is a MAC M1 Version 14.4.1 (23E224)
thierryc
(Thierry Charbonnel)
April 26, 2024, 8:00pm
7
thierryc:
DrawBotWindow
When I execute a macro before launching DrawBot, the output appears in the correct windows. But, the macro output displays within the DrawBot interface after DrawBot has been initiated.
I fixed drawbot. Since version 3.2, restarting the app should give you the latest version. You might need to restart twice.
to install a module into the Glyphs python as explained here: GitHub - justinpenner/TalkingLeaves: A GlyphsApp plugin to help you explore the world’s languages and writing systems
1 Like
thierryc
(Thierry Charbonnel)
April 26, 2024, 10:35pm
9
Thank you for your reactivity!
thierryc
(Thierry Charbonnel)
April 28, 2024, 8:47pm
10
Thank you Georg,
Thanks for the link! I tried the different installation options and ended up going with the official Python.org download for version 3.12.
The downside is that I needed to do some additional installations using pip3
in the console.
pip3 install --upgrade pyobjc cocoa-vanilla afdko fontbakery brotli
Correct me if miss one.
But hey, good news! Everything’s working smoothly now, and I can use pip3
to install any custom packages I need. (like hyperglot or easing_functions for the plugin)
Just thought I’d share my experience in case it helps anyone else out there struggling with Python installation.