I've upgraded to Catalina. It's been fine overall, but I just discovered today that fonttools is not working when I call it from a script. I can see it in the Python directory, and ttx still works from the command line. But if I try to run a script that calls fonttools, it says it's not defined. It seems that Python doesn't know about it anymore, and I'm not sure how to fix it.
Has anyone run into this, and if so how to fix it?
0
Comments
Mb you have installed fonttools to system python and try to call it with python from python.org?
Try to install some popular packages like numpy or lxml and import them. If you get this error again, then there is a problem in the installation path.
You can also try:
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py
But a more preferable and easy way is to install python from python.org and work with it.
FontTools 4.x, which just came out in August (I think), requires Python 3.6 or later. Current version is 4.0.2.
FontTools 3.x works with Python 2.7 or later, including the 2.7.16 that comes with macOS Catalina.
Fortunately, I haven't upgraded my laptop to Catalina yet, so I can run my scripts there until I get this sorted out.
Is it worth moving to FontTools 4.x? Will it break scripts that are based on earlier versions?
Pre-Catalina, I always used Textmate to run scripts. But the version of Textmate I was using wasn't 32-bit, so I figured I could just use BBEdit instead. The error I was getting made me think it was something to do with Catalina. But the problem is something to do with the way BBEdit runs Python scripts.
There may be a way to get BBEdit to work, but the simpler solution was to download a more recent version of Textmate. Works fine now. Duh.
Sorry for taking your time.
Update: I guess BBEdit requires "#!/usr/bin/env python" at the top of the script. Apparently, Textmate somehow assumes that if it's a .py file.