Describe the problem/error/question
I installed n8n self-hosted via npm on Windows and upgraded to n8n v2 (2.0.2).
When using the Code node with Python, n8n always reports that the Python virtual environment is missing, even though Python and the venv are correctly installed and working locally.
I would like to know whether this is a known limitation/bug of n8n v2 when installed via npm on Windows, and if there is any supported way to fix it without Docker.
What is the error message (if any)?
Python runner unavailable: Virtual environment 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
At n8n startup:
Failed to start Python task runner in internal mode because its virtual environment is missing from this system.
Please share your workflow
Single Code node
- Language: Python
- Example code: print("hello")
Share the output returned by the last node
No output.
The execution fails before the node runs.
Additional details / troubleshooting done
-
Python and virtual environment work correctly:
C:\n8n-python310\venv\Scripts\python.exe --version Python 3.10.10 -
Environment variable set:
setx N8N_PYTHON_VENV C:\n8n-python310\venv -
Variable is visible in terminal:
echo %N8N_PYTHON_VENV% C:\n8n-python310\venv -
Restarted terminal and system multiple times
-
Tried both
python.exeandpython3.exe -
Attempted to start Python runner explicitly:
n8n python-runnerResult:
Error: Command "python-runner" not found
This suggests that n8n 2.0.2 installed via npm does not expose the Python task runner CLI, even though the documentation references it.
Question
Is it currently not supported to use the Python Code node reliably on Windows + npm install in n8n 2.0.x?
If so:
- Which minimum n8n version properly supports Python task runners?
- Is Docker required, or does upgrading n8n fix this issue?
Thanks in advance.
Information on your n8n setup
- n8n version: 2.0.2
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: window
