ModuleNotFoundError: No module named 'flask'

Well, i was coding nina search, then i got the error

ModuleNotFoundError: No module named 'flask

even tho, flask is installed, and uninstall and install pip doesnt work.
What should i do?
btw i tried removing the “.config” dir and changing the “.replit” file.

The package manager on Python repls usually does everything for you, but if it doesn’t work I think you can directly add Flask to the repl’s Nix file.

Click on “Hidden files”, then go the replit.nix file and add pkgs.python39Packages.flask to the dependencies:

deps = [
	pkgs.python39Packages.flask
  ];

After this type kill 1 in the Shell to update the Nix file.

Hopefully that should work!

fixed the problem, but

Replit: Updating package configuration

--> python3 -m poetry lock
/nix/store/dkn992nw5z4d6hk5pxz6ah5q12a815fk-python3-3.9.6/bin/python3: No module named poetry
exit status 1


Replit: Package operation failed.

It seems a lot of poople have the same error today. I submitted a bug request on this issue… For the meantime, try typing pip install poetry in the Shell to see if that works

1 Like

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