memray run tries to match the updates to sys.path that are performed by the interpreter itself when it starts. When those path updates are suppressed (by the -I or -P command line flags or their corresponding environment variables), Memray's emulation winds up overwriting paths in sys.path that needed to be left alone.
memray run
tries to match the updates tosys.path
that are performed by the interpreter itself when it starts. When those path updates are suppressed (by the-I
or-P
command line flags or their corresponding environment variables), Memray's emulation winds up overwriting paths insys.path
that needed to be left alone.