I recently updated to n8n v2.1.4 via npm on Windows. I am trying to use the Code Node with Python, but it refuses to run, giving a “Python runner unavailable” error.
Tried setting the environment variable N8N_PYTHON_BINARY to the full path of my python executable (C:\Users\…\python.exe).
Restarted the terminal and n8n multiple times.
It seems the native task runner cannot locate the binary on Windows npm installs. Is there a specific configuration for Windows execution that I am missing?
Did anyone have the same issue? And if so, how did you solve it?
PS: I could find any information regarding this in the docs.
What is the error message (if any)?
Python runner unavailable: Python 3 is missing from this system
Internal mode is intended only for debugging. For production, deploy in external mode: https://docs.n8n.io/hosting/configuration/task-runners/#setting-up-external-mode
Regarding your question, the n8n app can’t find your Python program on windows because it runs in the background and doesn’t look in the same places as your terminal.
Here are your two best options:
Set a special system variable called N8N_PYTHON_BINARY to point directly to your python.exe file (like C:\Python\python.exe) and then restart your computer.
Run pip install n8n-python in your terminal, change the Code Node’s mode to “External”, and restart n8n. This is the most reliable way.
Hey again. It did not work. I put 3.10 in the user PATH. In the appdata local part. then I restarted my computer and tried running the command “pip install n8n-python” it gave me this output:
ERROR: Could not find a version that satisfies the requirement n8n-python (from versions: none)
ERROR: No matching distribution found for n8n-python
So what should I do? You just described the changes but did not really explain how to solve the problem. Do you mean that I should add/update the .env file in .n8n?
If you’re running n8n in Docker and get the “Python 3 is missing from this system” error, it usually means n8n is trying to run Python in internal mode, but modern n8n (2.x+) executes Python via external task runners instead — so having Python on the host doesn’t help.
To fix it, run a task runner container and wire it to n8n via the broker. Key points:
Use a matching runner image, e.g. n8nio/runners:<same n8n version>
I appreciate the help. I am in fact self-hosting via docker compose and came across this problem. I set up the task-runners instance in my compose.yaml and edited as you suggested (and the n8n docs said). Im still getting the error that python 3 is not available and n8n is running in internal mode. Do you know what else I could do? are how I can check if the runner can resolve the broker uri? Many Thanks
Hi everyone! For reference, I want to share my setup that’s working well for me. It shows how to run n8n with both JavaScript and Python task runners using Docker and docker-compose. Feel free to adjust it to fit your own needs.
Please take note that I used custom n8n docker image (Docker.n8n) to install Python so I can also use “Execute” node aside from “Code” node to run Python.
use custom N8N image for “Execute” node and task-runners for “Code” node
# Secret token used by n8n task runners to authenticate with the n8n server
# Replace with a strong, random value and do NOT commit to version control
N8N_RUNNERS_AUTH_TOKEN=REPLACE_WITH_A_STRONG_SECRET