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

Publish new repository with python3 as default #15

Open
guilhermesbrito opened this issue Nov 26, 2019 · 11 comments
Open

Publish new repository with python3 as default #15

guilhermesbrito opened this issue Nov 26, 2019 · 11 comments

Comments

@guilhermesbrito
Copy link

Hi,
as already there's a closed thread mentioning what can be done to spawn python3 instead of python, would you consider to create a node-red-contrib-python3shell repository with that modification? I think many users would appreciate it x)

thanks! and good work!
Cheers

@SgtZapper
Copy link

You can mod it and add an extra config checkbox that decides what version it needs to be.
I added config.python3 in the html and in the node

this.pythonExec = config.python3 ? "python3" : "python";

and then defining the spawn command like
var spawnCmd = (this.virtualenv ? this.virtualenv + '/bin/' : '') + this.pythonExec;

This could probably be made nicer with some radio boxes.

@BigJerBD
Copy link
Collaborator

BigJerBD commented Apr 5, 2020

I've Made a quick pull request on the suggestion.
It helps a lot when you use node-red with docker since its a pain to change what python is used

PR: #16

@namgk
Copy link
Owner

namgk commented Apr 5, 2020

hi there, thanks for your support, would you like to take over the npm package as well? This repo needs maintainers.

Thanks

@BigJerBD
Copy link
Collaborator

BigJerBD commented Apr 10, 2020 via email

@namgk
Copy link
Owner

namgk commented Apr 10, 2020 via email

@BigJerBD
Copy link
Collaborator

yup its "bigjerbd", full name Jeremie Bigras-Dunberry

@ozett
Copy link

ozett commented Jul 25, 2020

hi, you updated the node-red module?
i found some newer version here: https://github.com/BigJerBD/node-red-contrib-pythonshell

how do i install it on node-red?
i would had make an issue, but seems not possible on your cloned repo? or how do i make comments/questions?
i still find no way to specify the virtual-environment name.
i normally use it with "workon virt-name". how do i make this virt-env active in the node?

thanks for keepin up the node. seems helpful for going to python from node-red.

@BigJerBD
Copy link
Collaborator

Hey! Thanks for using this node.

I currently do not have the rights to update the npm package so the most recent change are probably not there. however @namgk does. So maybe release a new version would help.

About the fork I made. I only added a quick feature to have an argument handling field. If you feel like it I could add it to the main repository with a pull request (then hopefully release a new version with it )

if you want most recent version without waiting you still can install it manually:

  • clone the repository
  • run : npm install within the module
    • If you are not within a docker you may have to add -g at the end to do a global installation, but im not sure about that
    • within the node-red docker container simply npm install works
  • after that it nodes should be available in the node-red ui (reseting node red might be necessary too)

I have never used the virtual-environement with this node. so maybe @namgk could be helpful on that :)

@namgk
Copy link
Owner

namgk commented Jul 25, 2020

@BigJerBD, I think I invited you on npmjs.com long time ago, can you check if you can push update to the package?

@ozett
Copy link

ozett commented Jul 26, 2020

great guys, please update in the mantained repo that everyone in need can install it flawlessly through the node-red palette.
i will wait for feedback about update here on this thread. is this ok for you both? thanx!

@ozett ozett mentioned this issue Jul 27, 2020
@jampo
Copy link

jampo commented May 2, 2021

Hi any update on the publishing of pyhton3 support on npm? Would highly appreciate it :)

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

6 participants