Module not found error

I am trying to make a web app using streamlit. I have created fresh virtual environment for the project. installed all required libraries like Scikit-Learn and pandas-profiling. but as soon as I run my file it gives me an error saying
“ModuleNotFoundError: No module named 'pandas_profiling”
“ModuleNotFoundError: No module named 'sklearn”

all the packages are installed and running in terminal. but not with streamline. I have tried all the solutions from streamlit forums like creating virtual env.

and now it is happening for every library I use. is it a bug or something else.