How can I prevent Replit from trying to install irrelevant python libraries?

Question:
When running this Repl, Replit automatically tries to install irrelevant libraries as shown below:

  • app and generic are just internal app modules, which should not be confused with external python libraries
  • psycopg2 cannot be installed and leads to packager errors, given that this library should be installed with poetry add psycopg2-binary instead, which I have done

Is there a way to prevent Replit from automatically triggering this irrelevant poetry add command ?

Repl link:
https://replit.com/@kenxyz/flask-celery-template-6

Response from Console (packager):

--> poetry add generic psycopg2 app
Using version ^1.1.2 for generic
Using version ^2.9.9 for psycopg2
Using version ^0.0.1 for app

Updating dependencies
Resolving dependencies...

Package operations: 1 install, 0 updates, 0 removals

  • Installing psycopg2 (2.9.9)

  CalledProcessError

try adding the packages guess packages think into your .replit file, i forgot the specifics but i’ll reply with it soon.

Click three dots near files and click “Show hidden files”, then open the .replit file.
Insert this at the top-level of the file (anywhere near the top and not below any [section]s):

disableGuessImports = true
4 Likes

works, thanks ! would recommend to document here https://docs.replit.com/programming-ide/configuring-repl

1 Like

Yeah, there is a topic about that too and I pointed out this configuration there

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.