Installing hTools2 manually

0. choose a location

Choose a location on your hard disk to store the code libraries. For example:


Avoid using spaces or non-ASCII characters in folder names above the hTools2 folder.

1. getting the source-code

1a. download the zip

Download the latest version of hTools2 from the project’s repository on github.

Unzip and save it into the newly created code folder:


1b. check-out the code with git

If you are used to git, you can clone the code directly from the project’s repository on github:

git clone

2. adding the module to Python

2a. manually with a .pth file

Create a simple text file, containing the path to the Lib folder inside hTools2:



The easiest way to get the correct path is by dragging the Lib folder from Finder into a code editor or Terminal – so you’ll get the path without having to type it.

Save this file as hTools2.pth in the site-packages folder for the desired Python(s):


And that’s it.


This method will create a reference to the current Lib folder, in this case /code/hTools2/Lib/.

2b. with a setup script

As an alternative to the manual installation (2a), it is also possible to install hTools2 by running a setup script.

In the Terminal, go the hTools2 folder, and simply run the script with Python:

cd /_code/hTools2/
python install

If you get an error message regarding user permissions, try running the script with sudo:

sudo python install

This will prompt you to input your user name and password to allow access to system folders.


This method will copy the Lib folder to the Python site-packages folder.

3. testing the installation

To check if hTools2 has been installed successfully, try to run this line in the RoboFont scripting window or in Terminal:

import hTools2

If no error message is returned, the installation was successful.