Skip to content

Conversation

@yuzie007
Copy link

Thank you so much developers for sharing the code, which helps me quite a lot for jumping into ML-potential researches!

Short description

This modification allows us to install tensorpotential also in M1/M2 Mac.

Long description

The original tensorflow (as of 2.12.0) seems not available for M1/M2 Mac; we cannot find a wheel for M1/M2 Mac in PyPI (https://pypi.org/project/tensorflow/2.12.0/#files), and indeed I obtained the following error message;

% pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

Apple, instead, offers their own optimized tensorflow in a different name, tensorflow-macos (see https://developer.apple.com/metal/tensorflow-plugin/). To use this, however, we need to specify tensorflow-macos instead of tensorflow in install_requires.

For a simple specification of a platform, we may be able to use environment markers, but to specify M1/M2 Mac, it seems more straightforward to use the platform library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant