Installing python package on self-hosted n8n installed using npm

Hello,

I’m using a code node to convert text into a PDF using Python (FPDF), but how can I install the required package for the code node to use? The instructions I’ve seen here seem to be for Docker.

Thank you.

Information on your n8n setup

  • n8n version: 1.70.2
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Windows
1 Like

Hey @KeemOnN8N

With our Python support we are restricted to the packages that Pyodide supports, as you are using npm though you could create your script outside of n8n and install the packages and modules then use the execute command node and run the Python command and script from there.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.