Python package locations
Options

Wei Huang
Posts: 98
I think this isn't a font technology specific problem but I think people here have definitely had this issue before.
I installed fontTools with pip and it's located in
/usr/local/lib/python2.7/site-packages
It seems Fontlab and Glyphs App both expect it to be in
/Library/Python/2.7/site-packages/
What's the correct way to fix this? Can one add some kind of link to /Library/Python/2.7/site-packages/ telling both apps that it's in the former location? Or should it be installed in /Library/Python/2.7/site-packages/ anyway (how?)
I installed fontTools with pip and it's located in
/usr/local/lib/python2.7/site-packages
It seems Fontlab and Glyphs App both expect it to be in
/Library/Python/2.7/site-packages/
What's the correct way to fix this? Can one add some kind of link to /Library/Python/2.7/site-packages/ telling both apps that it's in the former location? Or should it be installed in /Library/Python/2.7/site-packages/ anyway (how?)
Tagged:
0
Comments
-
Can’t you just use a .pth file as a redirect?It’s been a while since I did this, so someone else will correct me if I’m wrong. Create a text file and name it “fontTools.pth”. The contents will be simply the path to your installation, just as you have it above (but with a trailing “/”). Place this .pth file in the directory where Fontlab and Glyphs are looking for fontTools.See if that works.
1 -
Glyphs doesn’t expect a specific location. It relies on the sys.path of the system python to include the path where the module is installed.0
-
You can specify pip package install locations with -t, but I don't think this is what you are after. If you are using a different pip than your system python/pip it will likely cause other issues down the road, even if you can point to the right site-packages.Make sure any other than the system pre-installed python/pip are run as separate binaries (e.g. brew python installs them as python2 or python3 to avoid collisions) and only install fonttools with pip once you are positive it’s the system pre-installed version and target directory for package installs.If you ever need to pip install anything for a specific project it’s a good idea to use either virtualenv or better yet pyenv to manage separate python environments for each project. For programs that look for packages in default locations you can then use the system pip to install packages, as an exception to the rule, so to say.
0 -
Thanks for the advice, I ended up symlinking it into the folder,
@Georg Seifert I see.. the former folder is definitely in the sys.path.0
Categories
- All Categories
- 46 Introductions
- 3.8K Typeface Design
- 476 Type Design Critiques
- 555 Type Design Software
- 1.1K Type Design Technique & Theory
- 640 Type Business
- 831 Font Technology
- 29 Punchcutting
- 507 Typography
- 120 Type Education
- 313 Type History
- 74 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 532 Announcements
- 85 Events
- 110 Job Postings
- 167 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 53 TypeDrawers Announcements
- 119 Suggestions and Bug Reports