naskio / n8n-nodes-python

Run Python code on n8n
https://www.npmjs.com/package/n8n-nodes-python
Other
99 stars 14 forks source link

Can't run python with npm package #5

Open jeremybep opened 1 year ago

jeremybep commented 1 year ago

Hi, I install package with community package on n8n via : https://www.npmjs.com/package/n8n-nodes-python i set up creadential like this : (i don"t know if the right way) image Then if i run python command it won't work : image cant find python path ?

If i run execute node with python command is working. image

n8n is install on windows 10 machine with npm, following this step : https://docs.n8n.io/hosting/installation/npm/ Latest n8n Latest nodejs Running on windows 10 and python 3.9 is install and working.

naskio commented 1 year ago

Hello @jeremybep We officially support this Docker image. We recommend you to use it to avoid this kind of problems.

jeremybep commented 1 year ago

erf, so there is no way tu use it with npm... ok

naskio commented 1 year ago

There's a way ofc. You can check the docker image repository to get an idea.

jeremybep commented 1 year ago

Hum, i try to understand with docker image but i didn't get it and how do it in windows env.

naskio commented 1 year ago

Sorry, I never use Windows. Basically, you need to have Python installed and configured in your env. On Linux, we can check this using python --version or which python. Maybe on Windows you should do: where python.

jeremybep commented 1 year ago

python is set to path env image

jeremybep commented 1 year ago

i d'ont know what to write on to make it work image

naskio commented 1 year ago

Normally, it should work when empty.

jeremybep commented 1 year ago

ok, is python3 linux call vs python windows call https://github.com/naskio/n8n-nodes-python/blob/master/nodes/PythonFunction/PythonFunction.node.ts#L171 if i change to python is working image

jeremybep commented 1 year ago

thanks

naskio commented 1 year ago

Exactly, you should make sure that where python3 print something.

golimarrrr commented 1 year ago

At least you got the PythonFunction interface inside n8n... I can't see it in my node list inside n8n web interface. Is this procedure correct?: