Can PyCharm find modules on sys.path updated within script

Sometimes we have modules in other locations within the project directory tree, locations which aren't on the path.

We load these using

sys.path.append(scripts_folder)
import my_local_module

This runs fine, but PyCharm doesn't seem to find these modules for the IDE features - it marks them as unknown, and doesn't offer the symbols within them for code completion.

Is there a way to get PyCharm to follow this updated sys.path and find them?

0
1 comment

Hi @Ian Brockbank, please try to add scripts_folder to interpreter path. Does it help?

0

Please sign in to leave a comment.