[BUG] Pip install fails on aarch64/arm64 platform due to watchdog dependency
Checks
- [x] I have updated to the lastest minor and patch version of Strands
- [x] I have checked the documentation and this is not expected behavior
- [x] I have searched ./issues and there are no duplicates of my issue
Strands Version
1.3.0
Python Version
3.12
Operating System
ARM64
Installation Method
pip
Steps to Reproduce
- Install strands agents via requirements.txt and pip install with version:
strands-agents>=0.1.0 & strands-agents-tools>=0.1.0 - Attempt to do pip install for aarch64 as platform
pip install --target ./package/python --platform manylinux_2_17_aarch64 --only-binary=:all: -r requirements.txt --no-build-isolation --force-reinstall - Notice failure
ERROR: Cannot install -r requirements.txt (line 13) because these package versions have conflicting dependencies.
The conflict is caused by:
strands-agents 1.3.0 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 1.2.0 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 1.1.0 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 1.0.1 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 1.0.0 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.3.0 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.2.1 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.2.0 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.9 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.8 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.7 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.6 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.5 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.4 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.3 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.2 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.1 depends on watchdog<7.0.0 and >=6.0.0
strands-agents 0.1.0 depends on watchdog<7.0.0 and >=6.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict
- Try again with
pip install --target ./package/python -r requirements.txt --no-build-isolation --force-reinstallon an x86_64 machine. - Notice pip install succeeds
Expected Behavior
arm64 should be supported in order to deploy to Lambdas that are using ARM64 layers.
Actual Behavior
pip install fails
Additional Context
No response
Possible Solution
No response
Related Issues
No response
changing platform to manylinux2014_aarch64 works, it is aarch64 with older tag, looks like watchdog don't have the prebuilt wheel file for manylinux_2_17_aarch64
@RamprasathS I tested this one out but unfortunately this will not work for us because manylinux2014_aarch64 is technically deprecated so it is does not have wheels for things like pymongo.
I confirmed that the x86_64 install works as expected. It's a bit annoying but we can convert our lambda from arm64 to x86_64 if necessary.
Note: at first glance I thought manylinux2014_aarch64 was the issue, but it's actually manylinux_2_17_aarch64
Need to dig into the manylinux_2_17_aarch64 platform to identify what it would take to support it; one option is to replace the dependency with one that has better support, another option would be finding out how to get watchdog built for manylinux_2_17_aarch64
Note that the tools repository tests against installing the dependencies for specific platforms; once we decide we want to support this, we should consider adding this as another test platform: https://github.com/strands-agents/tools/blob/c12a19c826855f218171cb80e4eac5679067579c/.github/workflows/test-lint.yml#L94
There may be a workaround here where you build the missing watchdog wheel yourself. I'll play around with the commands.
You may consider running the following actions:
$ mkdir -p ./wheels
$ pip download --dest ./wheels --platform manylinux2014_aarch64 --only-binary=:all: watchdog
$ cp ./wheels/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl ./wheels/watchdog-6.0.0-py3-none-manylinux_2_17_aarch64.whl
$ pip install --target ./package/python --platform manylinux_2_17_aarch64 --only-binary=:all: --find-links ./wheels -r requirements.txt --no-build-isolation --force-reinstall
I tested this in Docker with the following configuration:
FROM --platform=linux/arm64 python:3.13-slim
WORKDIR /app
COPY package/python /app/package/python
ENV PYTHONPATH=/app/package/python
CMD python -c "from strands import Agent; print('success')"
From a cursory glance at some docs (example), it seems the manylinux2014_aarch64 watchdog wheel is compatible with the manylinux_2_17_aarch64 wheel. This could thus be a workaround for the time being. To avoid these steps by default, we would need one of the following to happen:
- The watchdog maintainers publish a manylinux_2_17_aarch64 tagged wheel.
- We use an alternative to watchdog in Strands.
- We make watchdog an optional dependency in Strands with a note to customers that "hot-reloading" for tools is not supported on manylinux_2_17_aarch64 platforms unless the above steps are taken.
Option 1 of course is ideal.
Cut a feature request & PR to the watchdog project: gorakhargosh/watchdog#1125, gorakhargosh/watchdog#1126
PR has been merged by watchdog.
Latest reply is:
I will take time to cut a new release in coming days. It will contain at least one breaking change, and I must triple-check + adapt the documentation, so do not expect it "quickly".
so we're now just pending release by watchdog