Python Support and Release Versions

Hi

I did follow these steps

in short (on ubuntu server)

sudo npm install pm2@latest -g

(from what i remember, I couldn’t install without sudo, but I am a python guy, I am totally lost with npm)

pm2 start n8n (no sudo)

My pyodide is in /usr/lib/node_modules/n8n/node_modules/pyodide/

(not /usr/local/lib/node_modules/n8n/node_modules/pyodide/)

Is something messed up in my config ?

@jan when you say “access” you mean read permission ?

In my case, python is working, only imports seems broken

No, all fine. I do mean write access as it is using that folder for some reason to cache the modules.

any thoughts on this docker modules support?

It actually turns out that pip installing is not necessary at all. It will always download them automatically and cache. So will then also work with Docker. We are currently in the process of making that work correctly.

ah amazing! Looking forward to testing that!

I missed your previous answers

So in my case the issue could be the write access missing on folder /usr/lib/node_modules/n8n/node_modules/pyodide/ for the user running n8n ?

I am actually training my JS skill instead right now ^^

Hey @Valerian_Lebert,

You got it, But the good news is we have a fix for this in place that should make it into the 1.0 release.

Hi, super interested in this also and running into the issue with adding modules, should these be added auto in the 1.0 release as I tried it and getting the same error shown by Valerian above. I’m running N8n via Cloudron if that info is anything valuable.

Got fixed with this PR 5 days ago, but it did not get released with a version yet. You can however get it via the experimental nightly build docker.n8n.io/n8nio/n8n:nightly

1 Like

New version [email protected] got released which includes the GitHub PR 6568.

Hello,

Is there a roadmap where we can know when version 1.0 will be as the latest tag?

Thank you.

Welcome to the community @gerson!

That plan is currently the 24th of July.

3 Likes

Hey there, with no intention to change the topic of the conversation, I was wondering. I recently upgraded to 1.0.5 to check on the python feature. If I go ahead and select Python as an language and leave or add new code I never get to see the param to add modules that was described above. Should I be doing something different?

Regards,
JC

@jespinoza Ah, yes, that is not necessary anymore in the production version (which you are using now). You can simply import them (as long as they are supported) and they will be downloaded automatically.

2 Likes

Hi @jan, thanks for the work, i have one question, as stated in the docs of pydiode, it is possible to import new libraries, even install packages from pip: Loading packages — Version 0.23.4

Is there any hope that this will be available in future versions? I’m now using an alternate n8n source where it has python available as a new node “python node”, and as i make available libraries using “pip3 install …” in the dockerfile i can use custom community python packages from pip, as for example pypsrp (a module to interact with winrm protocol). Because of this i cant migrate to the available code node with python support (v1.0) as it only support the preinstalled pydiode libraries and cant seem to import new ones.

Thanks a lot and great work!

1 Like

Honestly wanted to check that out properly for a while now but never found time. That is why it is currently not officially supported also would we then still have to Witte docs for it. Theoretically should it however work. So you can give it a try.

yeah id like to be able to add new modules to python currently the pydiode doesnt let me do this.

Hi @jan , thanks for your response, but how theoretically should we import pydiode packages in n8n?
Running a nodejs node previous to the code-python node?
Could it be done generally available for all code-python node instances in n8n, like in a dockerfile deployment?

Thanks a lot

Hi any update on this please?

Thanks a lot

Hi, is there any work in progress related to allow using additional pip packages?
Thanks a lot