After migration to Nix, Repl needs to install Python packages every time I run

Basically, after my Repl migrated to Nix, I had to keep manually installing some of my python packages every time I run/every new session.

Currently, I need to manually install nextcord, flask and replit.

There’s also an error in the shell that appeared when I installed replit manually:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
nextcord 2.5.0 requires typing-extensions<5,>=4.2.0, but you have typing-extensions which is incompatible.

This happened in my Repl called “BeedCurrency”. It’s a Discord bot.

It also happened in my Repl called “BeedBot”, another Discord bot with nextcord, nextcordutils, humanfriendly and Pillow, but I did a temporary fix:

import os
from os import system

system("pip install nextcord nextcordutils humanfriendly Pillow")

Answers are appreciated, if my question is unclear, please let me know.

Hi @minecraft201109 , welcome to the forums! Try entering poetry add flask and poetry add nextcord into the Shell.

Additionally, you don’t have to use sys to install modules. You can just enter the pip command into the Shell.

I just tried running my Repl BeedCurrency but I received the error with humanfriendly (the module). I tried your method of poetry add but it simply said that it was already included.

I would have to do that every time I run with every module [that has the error] one by one, which would be inefficient.

1 Like

I believe you just have to install them, then you can use them.
However, if you are using it for many repls, you may have to do your suggestion.

Try running poetry install by itself then.