https://dagster.io/ logo
#announcements
Title
# announcements
g

geoHeil

03/21/2021, 10:53 AM
Can you help me to install the package in a way that dagster is happy?
s

schrockn

03/21/2021, 12:43 PM
Hmmm this a bit tricky to debug without some more information. I’m also not too familiar with conda and don’t know if that adds complications.
One thing that sticks out is that you should probably be using an editable install. So
pip install -e .
rather than
pip install .
I would also make sure that dagit is running in the idential environment of your script
so
python -m dagit
not just
dagit
d

daniel

03/21/2021, 4:31 PM
Does it help if you change
Copy code
from hello_b import hello_b_pipeline
to
Copy code
from .hello_b import hello_b_pipeline
or
Copy code
from usecase_b.hello_b import hello_b_pipeline
?
An import like "from hello_b import hello_b_pipeline" will only work if that folder is included in your sys.path, which isn't always the case. You can reproduce the problem outside of dagster by running "python -m usecase_b.repository_b".
g

geoHeil

03/21/2021, 7:30 PM
interesting @daniel indeed, this is reproducing the problem.
The
-e
is not changing anything.
python -m dagit
fails as well /reproduces the problem.
@daniel really interesting:
from .hello_b import hello_b_pipeline
works. But why?
I thought that
pip install
would include the package as a regular package - and thus it should be available on the syspath.
d

daniel

03/21/2021, 7:43 PM
python imports are confusing, but I believe pip install just installs the top-level module that you installed as a globally-accessible import, not every sub-folder. So I'd expect 'import usecase_b.hello_b' to work everywhere but not 'import hello_b'
12 Views