Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

viewer dependencies (freetype-py & pyglfw) do not include arm binaries for m1 macs

See original GitHub issue

Thanks so much for looking into #27 @stenson! I really appreciate all your help.

On a follow up on that: I could now get a few steps further, however I had to upgrade pip after it threw a ton of new errors at me. These are for later reference, perhaps this could be added to the install instructions.

either this pip install --upgrade pip setuptools wheel or into the venv: {...}/venv/bin/python3.9 -m pip install --upgrade pip not sure, I used my absolute path with was proposed by the terminal error. It seems that the PIP inside of the venv always needs to be updated. I tried again after I updated my local pip, and it threw the error about an outdated pip again.

then I do the pip install "coldtype[viewer]" and can’t see any errors in the log.

However, if trying to continue with coldtype demo

I get a bunch of errors again

Traceback (most recent call last):
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/freetype/", line 49, in <module>
   _lib = ctypes.CDLL(filename)
 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/", line 374, in __init__
   self._handle = _dlopen(self._name, mode)
OSError: dlopen(libfreetype.dylib, 6): image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/{MY_PATH}/Coldtype/venv/bin/coldtype", line 5, in <module>
   from coldtype.renderer import main
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/coldtype/", line 4, in <module>
   from coldtype.text import *
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/coldtype/text/", line 3, in <module>
   import coldtype.text.composer
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/coldtype/text/", line 7, in <module>
   from coldtype.text.reader import Style, StyledString, FittableMixin, Font, normalize_font_path, SegmentedString,  _PenClass, _PensClass
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/coldtype/text/", line 42, in <module>
   from coldtype.fontgoggles.font.otfFont import OTFFont
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/coldtype/fontgoggles/font/", line 7, in <module>
   from ..misc.ftFont import FTFont
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/coldtype/fontgoggles/misc/", line 5, in <module>
   import freetype
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/freetype/", line 24, in <module>
   from freetype.raw import *
 File "/{MY_PATH}/Coldtype/venv/lib/python3.9/site-packages/freetype/", line 52, in <module>
   raise RuntimeError('Freetype library not found')
RuntimeError: Freetype library not found

freetype is installed, running pip install freetype-py claims Requirement already satisfied: freetype-py in ./venv/lib/python3.9/site-packages (2.2.0). It also shows in the list pip list -l as freetype-py 2.2.0

_Originally posted by @Mark2Mark in

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:26

github_iconTop GitHub Comments

FlorianRhiemcommented, Nov 7, 2021

I’ve just released version 2.4.0 of the package glfw, along with wheels for macOS with arm64, so the pyglfw half of this issue should be fixed.

I’m using the binaries provided by GLFW3 and do not have an M1 macbook myself, so if there are any issues with the wheels, please let me know!

Mark2Markcommented, Oct 19, 2021

Ha, I thought I need the current monitor rect, so I installed pyobjc and asked for my screen

pip install -U PyObjC

from AppKit import NSScreen
nsScreenRect = NSScreen.mainScreen().frame()
x, y, width, height = nsScreenRect.origin.x, nsScreenRect.origin.y, nsScreenRect.size.width, nsScreenRect.size.height
work_rect = Rect((int(x), int(y)), (int(width), int(height)))

That also prevents the error, but the window appears again more than half offscreen.

However pin and False: totally did it.

YES it is working now. Amazing. Love to see it finally alive 🧟😍

Read more comments on GitHub >

github_iconTop Results From Across the Web

freetype-py - PyPI
This will install the library with a bundled FreeType binary, so you're ready to go on Windows, macOS and Linux (all with 32...
Read more >
Providing binary packages for Apple M1
Hello, as the psycopg2 maintainer I would like to provide binary packages for Apple M1. I understand that this machine can switch between ......
Read more >
Errors with installing a python dependency on a Mac M1
The idea is to create an x86 environment on the Mac and do your pip install after that. conda create -n <name> conda...
Read more >
Quellcode-Pakete in »sid«, Unterbereich misc
... gnome-shell-extension-manager (0.2.3-2); gnome-shell-extension-no-annoyance (0+20220925-c6804a4-2); gnome-shell-extension-panel-osd (1.0.50.gc032923-3) ...
Read more >
Managing ARM vs X86 Python on M1 Macs - Thinking Studio
The solutions I found when searching on Google were primarily around forcing the Conda environment to use X86 versions of the dependencies ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found