如何使用 python 在 repl.it 上自动在 shell 上安装模块

How to install modules on the shell automatically on repl.it using python

我正在制作一个不和谐的机器人,为此我需要为嵌入制作按钮,为此我需要导入一个库。一旦我将它导入到代码中,replit 就会说有 no module named discord_slash, so I went into the shell and used pip install discord-py-interactions,然后代码就可以工作了,但是每次我离开 replit 并返回它时,我都需要重复这个过程才能使代码工作。如何让它在我 运行 程序时自动安装该库?

before installing: 代码中没有任何更改。刚刚用 pip 在 shell 下载了它。 After installing:

我知道怎么做了。使用replit上的packages系统安装模块,然后会永久安装。