Closed marvinschmitt closed 6 months ago
We might maintain experimental Apple x86 support by the following conditional statements in setup.cfg
:
tensorflow-macos >= 2.10, < 2.16; sys_platform == 'darwin' and platform_machine == 'x86_64'
tensorflow >= 2.10.1, < 2.16; sys_platform != 'darwin' or platform_machine == 'arm64'
sys_platform=='darwin'
means "MacOS" and platform_machine=='arm64'
means "Apple Silicon (M1 etc.). This way, we always install tensorflow
unless users are on MacOS with x86 chips.
Python environment marker reference: https://peps.python.org/pep-0508/#environment-markers
Problem Description
After v.1.1.5, a fresh
pip install bayesflow
on Apple Silicon (M1) fails due to conflicting dependencies:Underlying Cause
After some initial research, this looks like a consequence of a breaking change in tensorflow 2.16.1: Apple Silicon users shall now use
pip install tensorflow
(new) instead ofpip install tensorflow-macos
(old).Source: https://github.com/tensorflow/tensorflow/releases/tag/v2.16.1
BayesFlow's current
setup.cfg
still differentiates between OS types to install eithertensorflow
ortensorflow-macos
.Solution
BayesFlow's
setup.cfg
needs to be updated. If we decide to stop support for the legacy Apple x86 hardware (Intel chips), we can just remove the conditional statement insetup.cfg
and always installtensorflow
. Opinions appreciated.