Martin
Martin

Reputation: 286

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

I am making a discord bot, for this I needed to make buttons for an embed, and to do that I needed to import a library. Once I imported it in the code replit would say that there is no module named discord_slash, so I went into the shell and used pip install discord-py-interactions, and then the code worked, however each time I leave replit and come back to it I need to repeat this process for the code to work. How to make it so that it automatically installs that library when I run the program?

before installing: Nothing was changed in the code. Just used pip to download it in the shell. After installing:

Upvotes: -3

Views: 887

Answers (2)

Liquid
Liquid

Reputation: 11

Use packages too install modules. It is on the left of your screen.

Upvotes: 1

Martin
Martin

Reputation: 286

I figured out how to do it. Use the packages system on replit to install the module, then it will be installed permanently.

Upvotes: 1

Related Questions