Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run python with npm package #5

Open
jeremybep opened this issue Dec 23, 2022 · 12 comments
Open

Can't run python with npm package #5

jeremybep opened this issue Dec 23, 2022 · 12 comments

Comments

@jeremybep
Copy link

jeremybep commented Dec 23, 2022

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
Copy link
Owner

naskio commented Dec 23, 2022

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

@jeremybep
Copy link
Author

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

@naskio
Copy link
Owner

naskio commented Dec 23, 2022

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

@jeremybep
Copy link
Author

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

@naskio
Copy link
Owner

naskio commented Dec 23, 2022

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
Copy link
Author

python is set to path env
image

@jeremybep
Copy link
Author

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

@naskio
Copy link
Owner

naskio commented Dec 23, 2022

Normally, it should work when empty.

@jeremybep
Copy link
Author

jeremybep commented Dec 23, 2022

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
Copy link
Author

thanks

@naskio
Copy link
Owner

naskio commented Dec 23, 2022

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

@golimarrrr
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants