Setup guide

Running your code

3-lance doesn't bundle any compilers — it uses the ones on your computer. Install a language once and every sheet in it becomes runnable. Here's how, for each of the common ones.

The short version

  1. Install the language using the instructions below.
  2. In 3-lance, open Settings → Toolchains and press Rescan.
  3. Open a sheet in that language and press ⌘R (or Ctrl+R).

No restart needed. Settings → Toolchains always shows exactly what 3-lance can currently find, with version numbers, so you can check it worked.

Python

The most common starting point. Sheets ending in .py.

On a Mac

macOS no longer ships a usable Python, so install your own.

  1. Install Homebrew if you haven't — paste the one-line command from that page into Terminal.
  2. Then run:
    brew install python
  3. Check it worked:
    python3 --version

Or download the installer from python.org if you'd rather not use a terminal at all.

On Windows

  1. Download from python.org/downloads.
  2. Tick “Add python.exe to PATH” on the first screen of the installer. It's off by default, and it's the single most common reason an editor can't find Python afterwards.
  3. Finish the install, then reopen 3-lance and press Rescan.

Missed the checkbox? Re-run the installer, choose Modify, and enable it — no need to uninstall.

JavaScript and TypeScript

Sheets ending in .js, .mjs or .ts.

On a Mac

  1. brew install node
  2. Or download the LTS installer from nodejs.org.

On Windows

  1. Download the LTS installer from nodejs.org.
  2. Accept the defaults — it adds itself to PATH automatically.

Recent Node versions run TypeScript directly. For older ones, install tsx with npm i -g tsx.

C and C++

Sheets ending in .c, .cpp or .h. These compile first, then run.

On a Mac

  1. Open Terminal and run:
    xcode-select --install
  2. Click Install in the dialog that appears. It's about 1 GB.

This gives you Apple's clang, which 3-lance uses for both C and C++. You do not need the full Xcode app.

On Windows

Windows has no C compiler out of the box. Two options:

  1. MSYS2 — install from msys2.org, then run pacman -S mingw-w64-ucrt-x86_64-gcc and add C:\msys64\ucrt64\bin to your PATH.
  2. Visual Studio Build Tools — heavier, but the Microsoft-supported route.

This is the fiddliest setup on Windows. Everything else on this page is easier.

Everything else

Same pattern each time: install it, press Rescan, run your sheet.

LanguageSheetsMacWindows
Go.go brew install go Installer from go.dev
Rust.rs Both: the one-liner at rustup.rs
Ruby.rb brew install ruby RubyInstaller
Java.java brew install openjdk Adoptium (JDK 11+)
PHP.php brew install php windows.php.net
Lua.lua brew install lua Via MSYS2, or LuaBinaries
R.r brew install r Installer from CRAN
Shell.sh Already there Needs WSL or Git Bash
PowerShell.ps1 brew install powershell Already there

If 3-lance still can't find it

Press Rescan first

Settings → Toolchains → Rescan. 3-lance re-reads your shell's PATH, so a fresh install is picked up without restarting.

Check it's really on PATH

Open a terminal and type the command — python3 --version. If your terminal can't find it either, the install didn't finish.

Windows: the PATH checkbox

Nine times out of ten this is it. Re-run the installer, choose Modify, and enable “Add to PATH”.

Restart after installing

On Windows especially, PATH changes only reach apps started afterwards. Quit 3-lance fully and reopen it.

Version managers

nvm, pyenv, rbenv and rustup all work — 3-lance reads the same PATH your login shell uses, so it sees the version you've selected.

Read the error

The output panel names the exact command it tried and where it looked. That usually points straight at the problem.

Ready to write

Install what you need, press Rescan, and press Run.

Download for MacApple Silicon · .dmg Download for Windows64-bit · installer