Can't import local packages to my main app

hey! :slight_smile:

I’m trying to import a local util package I’ve created into the main app-script.
it works fine when I run it on pycharm, but not on the web app. here’s my error:

I would like to understand what do I need to change in order to make It work.

best regards, you rock!,

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