Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Running a python bot

Featured Replies

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.

You could always just run the script (start it via user scripts as an example)

#!/usr/bin/python
.
.
.

 

  • Author

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?

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)

  • Author

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.

Python is not included as standard on UnRAID, but It can be installed via the NerdPack plugin.

  • Author

Is it correct I can only install Python 3.6.2 via Nerdpack? Or can I download 3.6.6? If so, how?

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 by itimpi

  • Author
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 by Cetje54

  • 2 years later...

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.