- Installing Python 3 on your system
- Installing Python 3 packages
- System Python
Among the changes introduced by RoboFont 3 is the upgrade from Python 2 to Python 3.
Installing Python 3 on your system
If all your coding work is done inside RoboFont 3 and DrawBot, then you don’t need to install anything else! Both apps come with Python 3 embedded.
This section is intended only for developers who also wish to use Python 3 outside of RoboFont 3.
Mac OS X comes with Python 2.7 out-of-the-box. If you wish to use Python 3 outside of RoboFont, you’ll need to install it on your system first.
To install Python 3, go to Python.org, click on the Downloads menu, and use the button to download the installer for the latest version of Python 3.
Once the download is finished, double-click the installer, and follow the instructions until the installation is completed.
Running Python 3 in Terminal
To run Python 3 in Terminal, use the
python3 command instead of just
user:~ user$ python3
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
If your work relies on external libraries, you’ll need to install them again for Python 3. See Installing Python 3 packages (below).
While it is possible to make Python 3 the default Python, that’s probably not a good idea: it may break some applications that depend on Python 2.
For more info, see How to set Python’s default version to 3.3 on OS X?.
Installing Python 3 packages
To make external packages available to the system-level Python 3, put your modules/packages or
.pth files here:
This folder is not created automatically by the Python 3 installer. If it does not yet exist on your system, you’ll need to create it manually.
.pthfile can contain a series of paths to be added to
sys.path, one per line. You’ll need to create this file manually with a code editor.
RoboFont 3 adds
sys.path on start-up, so all external packages installed for the system-level Python 3 will also be available in RoboFont 3.
If you wish to install external packages for RoboFont 3 only, put them in this folder instead:
Packages installed via this folder will not be available to the system-level Python 3.
external_packagesfolder also supports