-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Hi team,
I’m a user trying to install InterpretDL on a MacBook Pro M1 running macOS with Python 3.10, and I ran into several installation problems due to outdated dependency requirements.
What Happened
- Problem with scikit-learn:
InterpretDL (v0.8.0) requiresscikit-learn<=0.24. Unfortunately, scikit-learn 0.24 was released in 2020–2021 and was built only for older versions of Python (up to 3.9) and x86 architectures. On my M1 Mac running Python 3.10, pip cannot find prebuilt wheels for scikit-learn 0.24. Instead, pip falls back to compiling from source, which fails with various errors (e.g. due to the deprecatednumpy.distutils, unsupported compiler flag-faltivec, missing type definitions likeint_t, etc.). - Secondary Build Failures:
Additionally, many dependent packages (like an older version of NumPy required by scikit-learn 0.24) are not compatible with the ARM architecture and modern Python toolchains, further contributing to the build failures. - Version Conflict:
I even tried installing a newer version of scikit-learn that has ARM wheels (e.g. 1.3.2), but InterpretDL insists on the old version and outputs a version conflict message.
How I Solved It
My final working setup was to downgrade the Python version from 3.10 to Python 3.8.18 using pyenv. Then I manually installed all the dependencies required by InterpretDL in versions that work on my M1. Specifically, I installed:
scikit-learn==0.24.2tqdm,matplotlib,IPython,requests,scikit-image, andopencv-python
Finally, I installed InterpretDL itself using--no-deps(to prevent pip from attempting to override my manually managed versions).
To Reproduce
- Create a virtual environment using Python 3.10 on macOS M1, then activate it.
- Run
pip install interpretdl(this will trigger the build of scikit-learn 0.24 from source, resulting in errors). - Attempt to import interpretdl → errors will occur due to the failed builds and version conflicts.
Environment
- Python: tried 3.12 (fails) then created venv 3.10.16 (fails too), final working version: 3.8.18
- Architecture: macOS M1 (Apple Silicon)
- OS: macOS Sequoia
- PaddlePaddle: Installed with CPU support
1pha
Metadata
Metadata
Assignees
Labels
No labels