n8n-nodes-python icon indicating copy to clipboard operation
n8n-nodes-python copied to clipboard

Can't run python with npm package

Open jeremybep opened this issue 2 years ago • 12 comments

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.

jeremybep avatar Dec 23 '22 09:12 jeremybep

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

naskio avatar Dec 23 '22 09:12 naskio

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

jeremybep avatar Dec 23 '22 12:12 jeremybep

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

naskio avatar Dec 23 '22 13:12 naskio

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

jeremybep avatar Dec 23 '22 14:12 jeremybep

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.

naskio avatar Dec 23 '22 14:12 naskio

python is set to path env image

jeremybep avatar Dec 23 '22 14:12 jeremybep

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

jeremybep avatar Dec 23 '22 14:12 jeremybep

Normally, it should work when empty.

naskio avatar Dec 23 '22 14:12 naskio

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 avatar Dec 23 '22 14:12 jeremybep

thanks

jeremybep avatar Dec 23 '22 14:12 jeremybep

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

naskio avatar Dec 23 '22 14:12 naskio

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?:

  • pip install fire

  • npm install n8n-nodes-python -g

  • Restart n8n

golimarrrr avatar Mar 13 '23 15:03 golimarrrr