Fix: ‘gnuplot’ Is Not Recognized as an Internal or External Command

You installed gnuplot on Windows, opened Command Prompt or PowerShell, typed gnuplot — and got:

'gnuplot' is not recognized as an internal or external command,
operable program or batch file.

Gnuplot is almost certainly installed and working. Windows simply does not know where to look for it.

What this message means

When you type a bare program name, Windows searches the folders listed in the PATH environment variable — and only those. The gnuplot installer offers to add its folder to PATH, but that option has to be selected during setup. Skip it (or install the portable build, which never touches PATH), and the fully working program stays invisible to the command line.

Causes, most likely first

  1. The PATH option was not ticked during installation. The installer’s “Add application directory to your PATH” choice was left off.
  2. The terminal was opened before the install finished. Already-open Command Prompt and PowerShell windows keep the PATH they started with; they never see later changes.
  3. You are testing with the wrong name or in the wrong folder. The console executable is gnuplot.exe; the classic GUI-piped variant is wgnuplot.exe. Neither is found if PATH points somewhere else.

Fixes, step by step

1. Fastest check: call gnuplot by its full path

The default install location puts the executables in the bin subfolder:

"C:\Program Files\gnuplot\bin\gnuplot.exe" --version

If that prints a version line such as gnuplot 6.0 patchlevel 5, the installation is healthy and this is purely a PATH problem. (If the folder is not there, reinstall first — the Windows install guide covers the standard route.)

2. Add gnuplot to PATH manually

  1. Press the Windows key and type environment variables, then open “Edit the system environment variables”.
  2. Click “Environment Variables…”.
  3. Under “System variables” (or “User variables”, if you prefer it per-account), select Path and click “Edit”.
  4. Click “New” and add: C:\Program Files\gnuplot\bin
  5. OK your way out of every dialog — changes do not apply until all of them are confirmed.

3. Reopen the terminal, then verify

Close every Command Prompt/PowerShell window and open a fresh one — this step is not optional, since running terminals never refresh their PATH. Then:

gnuplot --version
where gnuplot

where gnuplot prints the exact executable Windows resolves, which is the definitive proof the PATH entry works. Our installation verification guide continues from here with the full checklist (version output, a first plot, terminal list).

Alternative: reinstall and tick the box

Running the installer again and selecting “Add application directory to your PATH” achieves the same result without manual editing — the manual route above is simply faster and works for portable installs too.

A minimal script that works

Once gnuplot --version answers in a fresh terminal, this proves end-to-end plotting from the command line:

gnuplot -e "set terminal pngcairo; set output 'test.png'; plot sin(x)"

A test.png should appear in the current folder. If the version command still fails in a brand-new terminal, double-check the PATH entry for typos — a missing \bin at the end is the usual one.

Still stuck?

The official documentation at gnuplot.info includes the full command reference, and the gnuplot-info mailing list linked there is the best place to ask when a script misbehaves in a way this page does not cover — include the exact error message and a small sample of your data when you post.

Related troubleshooting

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *