It says that discord does not exist as an import despite discord.py existing in requirements.txt

This is the error message:

Instance created. Preparing to start…
Traceback (most recent call last):
File “/workspace/main.py”, line 1, in
from discord.ext import commands
ModuleNotFoundError: No module named ‘discord’

However, my reference file lists:
aiohappyeyeballs==2.6.1
aiohttp==3.11.16
aiosignal==1.3.2
attrs==25.3.0
audioop-lts==0.2.1
discord.py==2.5.2
frozenlist==1.5.0
idna==3.10
multidict==6.4.3
pip==25.0.1
propcache==0.3.1
yarl==1.19.0

which should pass all the arguments required.
Why might this be failing?

Hello @Bran_Muffins, sorry for a late answer. Does the code work locally?