Suppose the Python package mypackage
is at a non-standard location on my machine and I am running Python code in the VSCode interactive window. If I type
import mypackage
it will not be found. This can be remedied by doing sys.path.append("/path/to/mypackage")
. However, I would like to set things up so that within a given project each time I open the interactive window a set of paths, like /path/to/mypackage
, have already been added to the search path. Is there a way to do this?