Can't import local packages to my main app

Hello @amit3354,

My guess is utils is installed in a specific python virtual environment, which PyCharm uses when you run the script. And when you ran it with streamlit, you were outside that virtual environment.

If I’m right, make sure to activate the virtualenv before running streamlit. Or try to run streamlit in PyCharm’s terminal, I think it will automatically activate the virtualenv for you.

1 Like