Cetje54 Posted October 24, 2018 Share Posted October 24, 2018 Hey y'all! I'm getting into programming with python now, and as a side project am making a discord bot in python. I was wondering how to dockerize/run the script from my UNRAID server, so continuously. It runs with python 3.6.6 and I have to be able to install libraries. Thanks! P.S. I have tried looking it up but I can't seem to find anything useful to my case yet. Quote Link to comment
Squid Posted October 24, 2018 Share Posted October 24, 2018 You could always just run the script (start it via user scripts as an example) #!/usr/bin/python . . . Quote Link to comment
Cetje54 Posted October 24, 2018 Author Share Posted October 24, 2018 Could you please elaborate... I'm not experienced with python on UNRAID, and where should I place my .py file? How do I get to user scripts? With the terminal? Quote Link to comment
Squid Posted October 24, 2018 Share Posted October 24, 2018 Not a python guy. But, you *should* be able to simply have your script prefaced with #!/usr/bin/python and make sure that its executable chmod +x /path/to/file and it should work from the command prompt. Barring that, I would think that python /path/to/file would work also. AFAIK python is included in unRaid User scripts is a plugin that will allow you to execute any script on a schedule you choose (available within apps) Quote Link to comment
Cetje54 Posted October 24, 2018 Author Share Posted October 24, 2018 python is an unrecognized command, and I don't know what you mean by #! /usr/bin/python and the chmod command but they both don't work. Quote Link to comment
itimpi Posted October 25, 2018 Share Posted October 25, 2018 Python is not included as standard on UnRAID, but It can be installed via the NerdPack plugin. Quote Link to comment
Cetje54 Posted October 25, 2018 Author Share Posted October 25, 2018 Is it correct I can only install Python 3.6.2 via Nerdpack? Or can I download 3.6.6? If so, how? Quote Link to comment
itimpi Posted October 25, 2018 Share Posted October 25, 2018 (edited) 5 minutes ago, Cetje54 said: Is it correct I can only install Python 3.6.2 via Nerdpack? Or can I download 3.6.6? If so, how? I see that is the version that it currently has available. However if you raise a request in the NerdPack plugin thread it is likely it will be updated. are you actually intending to make use of features that require 3.6.6? Edited October 25, 2018 by itimpi Quote Link to comment
Cetje54 Posted October 25, 2018 Author Share Posted October 25, 2018 (edited) Quote are you actually intending to make use of features that require 3.6.6? not sure, but like to have the same version as my IDE is in for safety, however when I get PIP working with python3 in nerdpack I'll give it a try anyways. Do you know how to use PIP with python3? Now it uses python2.7 which was required to install if I wanted PIP Everything works fine! Edited October 25, 2018 by Cetje54 Quote Link to comment
learningunraid Posted February 17, 2021 Share Posted February 17, 2021 On 10/25/2018 at 2:13 AM, Squid said: You could always just run the script (start it via user scripts as an example) #!/usr/bin/python . . . Hi, I wish to run this script on the UnRaid Server. Github: https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2 How can I do so? Thanks. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.