Install Requirements
1. Python 3.10+
Check Your Python Version
To check if you have a high enough version of Python:
Open your favorite terminal application.
Try running
pythonIf it says the command was not found, try the following:
python3python3.10or later minor version numbers
At least one of them should show something like the output below:
Example Python prompt for version 3.10.12Python 3.10.12+ (heads/3.10:f91dfdf5ff, Jul 20 2023, 21:32:15) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
If it doesn’t, the see Installing Python section below.
If it does, then:
type
exit()press enter
skip to Your Needs
Installing Python
Windows & Mac
On these platforms, it’s best to install Python from the official download pages:
Linux
Your distro’s package manager is usually the best place to look.
Distro |
Best Approach |
Linux Mint (All flavors) |
|
|
|
|
|
|
Note
Ubuntu is at the bottom its Snap format has had multiple serious issues.
These include:
Shipping
.debpackages which instead install Snap versionsPerformance issues compared to
.deb
If you don’t have 3.10 or higher in your distro’s package manager, see Non-Standard Python on Linux.
2. Active Virtual Environment
Python’s virtual environments (venvs for short) protect your projects from breaking each other. On operating systems such as Linux, they also help protect your system Python version.
In most cases, you’ll want to do the following:
1. Create a Virtual Environment
If you aren’t using PyCharm or VSCode, you can create a venv from the terminal with:
python -m venv .venv
This will create a venv named .venv in the current directory. To
learn more, please see Python’s Creating virtual environments.
2. Make Sure Your Venv Is Activated
The way you activate a virtual environment varies with your:
operating system
development tools
With PyCharm and other heavyweight development environments, your venv will usually be automatically activated in the terminal windows of the tool.
If you’re using lighter tools, you may need to activate the venv manually through the terminal. The table of examples below assumes you created a venv as in the last section:
In the root directory of your project
Named
.venv
OS |
Example Command |
|---|---|
Windows (CMD) |
|
Windows (PowerShell) |
|
Mac, Linux, and BSDs |
|
To learn more, please see Python’s How venvs work.
Account-Wide Usage Via pipx
If you only need to use Fontknife as a utility instead of an imported Python module, you can use pipx. It allows running any’ python package which provides runnable named scripts across your entire user account. It works by creating package-specific virtual environments, then performing some routing work.
After installing it, you can use pipx instead of pip when following
install instructions.