The current version of ms2deepscore has tensorflow in the install_requires which prevents successful installation on m1 macbooks. I've managed to get ms2deepscore to install and run on my M1 MacBook by slightly modifying the install requires.
I cloned the repo, and basically changed the setup.py install_requires and extras_requires with respect to tensorflow to be platform specific (see below). In macOS m1 one needs to make use of two distributions to unlock tensorflow cpu and gpu capabilities, hence the separate tensorflow-macos and tensorflow-metal packages.
There is one downside to this fix however; tensorflow, tensorflow-macos, and tensorflow-metal are not automatically installed if placed into the extras_requires like this, but are needed to successfully import ms2deepscore. They can however be separately pip installed. Both modules will be available together as a tensorflow module for importing, so no import code changes are needed anywhere; the entire MS2DeepScore_tutorial.ipynb can be run without changes.
I’m not sure whether the platform system dependence can be added to the install requires themselves somehow.
The current version of ms2deepscore has tensorflow in the install_requires which prevents successful installation on m1 macbooks. I've managed to get ms2deepscore to install and run on my M1 MacBook by slightly modifying the install requires.
I cloned the repo, and basically changed the setup.py install_requires and extras_requires with respect to tensorflow to be platform specific (see below). In macOS m1 one needs to make use of two distributions to unlock tensorflow cpu and gpu capabilities, hence the separate tensorflow-macos and tensorflow-metal packages.
There is one downside to this fix however; tensorflow, tensorflow-macos, and tensorflow-metal are not automatically installed if placed into the extras_requires like this, but are needed to successfully import ms2deepscore. They can however be separately pip installed. Both modules will be available together as a tensorflow module for importing, so no import code changes are needed anywhere; the entire MS2DeepScore_tutorial.ipynb can be run without changes.
I’m not sure whether the platform system dependence can be added to the install requires themselves somehow.