Hello! I'm facing a problem installing dalex in Me...
# ask-metaflow
a
Hello! I'm facing a problem installing dalex in Metaflow 2.12.5 using @pypi_base. I wrote:
Copy code
@pypi_base(
packages={
"dalex": "1.7.2",
...
},
python="3.12.6",
)
But when Metaflow bootstraps the virtual environment, I get:
ERROR: Could not find a version that satisfies the requirement dalex==1.7.2
(from versions: 0.1.0, 0.1.2, ..., 0.2.0)
It seems that Micromamba / Metaflow is only seeing the old dalex versions (0.1.x → 0.2.0), even though dalex 1.7.2 exists on PyPI and installs fine outside Metaflow. For example, if I run locally:
pip install dalex==1.7.2
It works perfectly, but inside Metaflow’s Micromamba environment it fails. It looks like Metaflow 2.12.5 with Python 3.12 + Micromamba cannot find the dalex 1.7.x wheel!!
✅ 1
d
I believe it is because it is only available as a .tar.gz and not a wheel. Are you trying cross platform?
👍 1
a
In our case, deploying to AWS Step Functions uses linux based containers and dalex 1.7.x cannot be installed because it is only available as a source distribution, not a pre-built wheel. So, Metaflow environment lacks the necessary build tools to compile it. is there any workaround.
f
you can build it into an image for the step that needs dalex and pass that into your
@batch
decorator call https://docs.metaflow.org/api/step-decorators/batch
✅ 1
batch also let's you customize things w launch templates if you need to tweak things at a lower level
✅ 1
*aws batch not the metaflow batch decorator
a
Thanks guys, that was helpful.