How to stop replit guessing packages in Python template


I’ve noticed the format of .replit file changed to TOML since the last time I used it (Python repl loads an incorrect package - Support / Bug Reports - Replit Ask).

Now it doesn’t seem I can disable guessing imports.

I have the following in .replit file:

entrypoint = ""
modules = ["python-3.10:v18-20230807-322e88b"]

hidden = [".pythonlibs"]

channel = "stable-23_05"

run = ["sh", "-c", "python3"]

language = "python3"
ignoredPackages = ["flet-pyodide"]

packageSearch = false
guessImports = false

and yet replit keeps installing flet-pyodide package when running repl.

What am I doing wrong?


you are not doing anything wrong what has happened is replit made it different maybe research whats goin g on

1 Like

One way to prevent Replit from auto-installing packages is to run this in Shell:

I’m not certain, but this may break the packager. Even if it does, you can always just use poetry directly from the Shell.


The configuration doesn’t work so you’ll have to either:

1 - If possible, tell upm explicitly which package to import with a comment

import pygame  #upm package(pygame-ce)

2 - Break upm so it can’t guess anything (also disables packager tab)
Either use the shell command or delete the contents of .upm/store.json to break upm.

1 Like

Replit will just restore it because it thinks you are doing “destructive actions” and it is trying to “help you” but it is not helpful at all.


It doesn’t look like UPM restores the cache. It’ll only do that if you delete the entire file.

Import comment worked like a charm, thank you!

import flet as ft  #upm package(flet)
1 Like

The configuration for import guessing has been fixed: