Troubleshooting

Fix “ollama is not recognized” on Windows

The error means Windows cannot find ollama.exe on your PATH. The fix is almost always opening a new terminal window after installing. This guide covers all causes and exact steps to fix each one.

What this error means

The full error message is:

cmd.exe
C:\> ollama run llama3
'ollama' is not recognized as an internal or external command,
operable program or batch file.

In PowerShell it looks like:

PowerShell
ollama : The term 'ollama' is not recognized as the name of a cmdlet,
function, script file, or operable program.

Both mean the same thing: Windows cannot find ollama.exe in any folder on your PATH. This is almost always one of three causes: PATH not updated, terminal not restarted, or Ollama not installed.

Open a new terminal window

This is the fix for 80% of cases. When Ollama installs, it adds itself to your PATH — but that change only applies to new terminal sessions. Any terminal that was already open before you installed Ollama will not see it.

cmd.exe — close old window, open new one
# Close ALL open terminals, then open a fresh one:
C:\> ollama --version
ollama version 0.6.5
# If this works, you are done.
Always open a completely new Command Prompt or PowerShell window after installing Ollama. Do not just open a new tab in an existing window — open a new application instance.

Check what is actually happening

Before changing PATH settings, run these checks in a new terminal:

cmd.exe — new window
# Step 1: Is Ollama installed?
C:\> dir "%LOCALAPPDATA%\Programs\Ollama\ollama.exe"
ollama.exe ... found
# Step 2: Is it on PATH?
C:\> where ollama
C:\Users\YourName\AppData\Local\Programs\Ollama\ollama.exe
# Step 3: What does PATH contain?
C:\> echo %PATH%
# Look for "Ollama" in the output

If Step 1 fails: Ollama is not installed → Download and install.
If Step 1 passes but Step 2 fails: PATH is not set → continue to Fix 2.

Ollama is installed but not on PATH

Ollama installs to %LOCALAPPDATA%\Programs\Ollama. Add this folder to your PATH:

GUI method (permanent)

  • Press Win+S → search Environment Variables → click Edit environment variables for your account.
  • Select PathEditNew.
  • Type %LOCALAPPDATA%\Programs\Ollama and click OK on all dialogs.
  • Open a new terminal and run ollama --version.

Command line method (current session only)

cmd.exe
C:\> set PATH=%PATH%;%LOCALAPPDATA%\Programs\Ollama
C:\> ollama --version
ollama version 0.6.5

This works only in the current window. Use the GUI method for a permanent fix.

Ollama is not installed

If the dir check in step 1 above returns "File Not Found", Ollama is not installed. Download and install OllamaSetup.exe, then open a new terminal and try again.

Wrong Ollama version in PATH (Git or other tools)

Some tools like Git for Windows, Cygwin or Anaconda bundle older OpenSSL or other binaries that could shadow commands. Run where ollama to see all resolved paths:

cmd.exe
C:\> where ollama
C:\Users\YourName\AppData\Local\Programs\Ollama\ollama.exe
# If you see multiple results, the first one wins.
# Move the Ollama folder to the TOP of PATH using the GUI.

Not recognized questions

Works in cmd.exe but not in PowerShell
Both shells read from the same User PATH. If it works in one but not the other, the failing shell was opened before the PATH change. Open a brand new PowerShell window (not just a new tab) and try again.
ollama pull works but ollama run does not
This is unusual — both commands use the same binary. If only run fails, check if the Ollama service is running: right-click the system tray icon. If there is no tray icon, start Ollama from the Start menu.
After Windows update, ollama stopped working
Windows updates occasionally reset or trim PATH entries. Open Environment Variables and check that the Ollama folder is still in the list. If it is missing, add it back as described in Fix 2.
setx says "SUCCESS" but ollama still not found
setx saves the PATH change to the registry but the current terminal does not see it. Close the terminal completely, open a new one, and try again.

Need to install Ollama?

Download the official Windows installer and set up in minutes.

Download Ollama