I brought this up in the thread by <@U02JZ4ALX2M> ...
# general
e
I brought this up in the thread by @tall-truck-67859 (https://pantsbuild.slack.com/archives/C046T6T9U/p1634910245074000?thread_ts=1634901465.069900&amp;cid=C046T6T9U), but this smells like a source root configuration problem. @stale-nightfall-29801, in order to import across projects, Pants needs to know project boundaries. In other words, to correct:
Copy code
from core.test_utils import token
E   ModuleNotFoundError: No module named 'core.test_utils'
Pants needs to know
X
in the filesystem path
X/core/test_utils.py
. Pants call
X
a "source root". This is equivalent to a
PYTHONPATH
entry for Python. The list of "source roots" Pants knows about can be found by running
pants roots
. If
X
is not in the list printed out, you need to teach Pants about
X
as described here: https://www.pantsbuild.org/docs/source-roots#configuring-source-roots