'Can't run the module flask in python

I've been trying to run a code from the internet but I get this error that says:

in from flask import Flask ModuleNotFoundError: No module named 'flask'

This is supposed to be a referrence to something i need to work with and i don't know how to fix this as it's not my code.

Here's the link to the code where i got it from:

https://www.geeksforgeeks.org/create-simple-blockchain-using-python/

I just need to run it once so that i could get working on my stuff too.

Edit: i use the basic idle from python btw...



Solution 1:[1]

Maybe you dont have flask installed in your dev environment. Do pip install Flask or pip3 install Flask to install flask

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Global-Occult