coding
ujalt
HOBBYOP

a year ago

File "/app/main.py", line 1, in

import discord

ModuleNotFoundError: No module named 'discord'

$10 Bounty

5 Replies

Railway
BOT

a year ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


a year ago

Did you run the install commands for discord?


abhi9835004352
FREE

a year ago

first u will have to install the package of discord using the pip commands and then u can remove that part of the error.


gamerc0der
PRO

a year ago

Add a requirements.txt file including the lib discord.py in the requirements txt file as follows:

```

discord.py

```

Your other libs also need to go in the requirements.txt file to be installed.


anshonweb
HOBBY

a year ago

before uploading your files to railway run

>pip freeze > requirements.txt

This would create a file called requirements.txt,

The requirements.txt file should have something like this in it:

> discord.py==2.4.0

If not, make sure you have discord.py installed on your project locally.

Do it by running pip install -U discord.py


Welcome!

Sign in to your Railway account to join the conversation.

Loading...