Skip to content

T3 API : Setting Up Python

Matt Frisbie edited this page Jul 11, 2025 · 3 revisions

Setting Up Python

You only need a basic knowledge of using the command line to run T3 API Python scripts. This knowledge can be picked up very quickly.


TL;DR

  1. Open the command line
  2. Install UV
  3. Install Python: uv python install

Learning to use the Command Line

What is the Command Line?

The command line, also called the terminal or shell, is an interface that lets you interact with your computer using text commands. It’s especially useful for running programs like Python scripts without needing a graphical interface.

Opening the Command Line

To open the command line:

  • Windows:

    • Press Win + R, type cmd, and hit Enter for Command Prompt.
    • Or search for "PowerShell" or "Windows Terminal".
  • macOS:

    • Press Command + Space, type "Terminal", and press Enter.
  • Linux:

    • Press Ctrl + Alt + T or search for "Terminal" in your application menu.

Navigating Directories

The command line is always "inside" a specific folder on your computer. To run a script, you need to open the terminal in the same folder or navigate to it manually using the cd command.

Open a terminal in the current folder:
  • Windows:

    • Option 1: Shift + Right-click inside a folder → “Open PowerShell window here”
    • Option 2: Type cmd or powershell in File Explorer’s address bar
    • Option 3: Use Windows Terminal from the Microsoft Store
  • macOS:

    • Option 1: Right-click in Finder → “New Terminal at Folder”
    • Option 2: In Terminal, type cd and drag the folder into the window
  • Linux:

    • Option 1: Right-click in file manager → “Open in Terminal”
    • Option 2: Navigate to folder, press Ctrl + Alt + T

Setting Up Your Environment

For beginners, we recommend using Python and UV to interact with the T3 API. All T3 example scripts are written in Python.


Installing UV

UV is a Python package and environment manager. It simplifies dependency handling, virtual environments, and even installs Python itself.


Installing Python

With UV installed, run:

uv python install

This installs the latest Python version automatically.


Set Your Terminal Location

Before running scripts, make sure your terminal is "in" the folder where the script lives. See Navigating Directories above.

Troubleshooting

Platform-Specific Tips

  • Windows: Try py script.py if python doesn’t work.
  • macOS/Linux: Use python3 instead of python if needed.

Common Issues

  • “Python is not recognized…”: Python isn't in your system's PATH. Try using UV’s Python (uv python install) or reinstall from python.org and check the box to "Add to PATH".
  • Permission Errors (macOS/Linux): Run chmod +x script.py if the script needs execution permissions.
  • Package not found: Make sure you ran uv pip install -r requirements.txt from the correct folder.

Next Steps

Sidebar

Clone this wiki locally