-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support on packaged dags #8716
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
https://airflow.readthedocs.io/en/latest/concepts.html?highlight=packaged%20dags#packaged-dags Packaged DAGs is only a partial solution to the dependency problem because it only allows you to load simple Python libraries. All complex math libraries are not supported. |
Ok. And what's the best practice for dealing with dependency problems? What I've seen so far:
|
I'm trying to use
apache airlfow
with packaged dags.I've written my code as a python package and my code depends on other libraries such as numpy, scipy etc.
This is
setup.py
of my custom python package:requirements.txt contains packages ( vertica_python, pandas, numpy etc) along with their version needed for my code.
I wrote a litte shell script based on the one provied in the doc for creating packaged dags:
The shell will install my package along with dependencies directly from gitlab, zip and then move to the dags folder.
This is the content of the folder tmp_dir before being zipped.
Airflow doesn't seem to be able to import package installed in lib or lib64.
I'm getting this error
I even tried to move my custom package outside of lib:
But still getting same error.
One of the problem I think relies on how to use
pip
to install package in a specific location.Airflow example use
--install-option="--install-lib=/path/"
but it's unsupported:Using
--prefix
leads to a structure like above, with module not found error.Using
--target
leads to every package installed in the directory specified.In this case I have a pandas related error
I guess that it's related to dynamic libraries that should be available at a system level?
I really don't know how to do that.
Thanks
The text was updated successfully, but these errors were encountered: