fonttools in Catalina
Mark Simonson
Posts: 1,736
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?
Has anyone run into this, and if so how to fix it?
0
Comments
-
What about other non-standard packages?
Mb you have installed fonttools to system python and try to call it with python from python.org?0 -
I'm using the system Python (2.7.16). (Pre-Catalina, it was 2.7.10.) I don't really use any other non-standard packages, although it looks like a few were installed at some point (e.g. vanilla). None of these seem to be known by Python, either.0
-
It's not recommended to use system python.
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:python -m pip install fonttools
0 -
No pip either. System Python has always worked for me in the past. Has this changed?
0 -
If you really want to use system python, you can try to install pip
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-pyand then install fonttools with pip
But a more preferable and easy way is to install python from python.org and work with it.0 -
Mark Simonson said:No pip either. System Python has always worked for me in the past. Has this changed?
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.
0 -
Hm. Looks like I'll just have to reinstall FontTools. Apparently, I was using version 2.3 before. I'm not sure if it's possible (or advisable) to use that on 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?0 -
Never mind. It turns out the problem was trying to run the script from BBEdit.
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.1
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 801 Font Technology
- 1K Technique and Theory
- 618 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports