stellargraph / stellargraph

StellarGraph - Machine Learning on Graphs
https://stellargraph.readthedocs.io/
Apache License 2.0
2.93k stars 429 forks source link

Use stellargraph with tensorflow_macos on Mac M1 #1856

Open sanyabt opened 3 years ago

sanyabt commented 3 years ago

Describe the bug

Hi, I am trying to install stellargraph using pip on mac M1 with tensorflow release tensorflow_macos (as here). However, stellargraph setup.py does not recognize it as satisfying the tensorflow>=2.1.0 requirement. Is there anything I can change temporarily or fix to be able to use stellargraph with mac M1?

To Reproduce

Steps to reproduce the behavior:

  1. Working with miniforge, installed python==3.8.6 and tensorflow_macos
  2. Clone stellargraph/stellargraph.
  3. cd stellargraph/
  4. pip install .
  5. See error

Observed behavior

ERROR: Could not find a version that satisfies the requirement tensorflow>=2.1.0 (from stellargraph==1.3.0b0) (from versions: none) ERROR: No matching distribution found for tensorflow>=2.1.0 (from stellargraph==1.3.0b0)

Environment

Operating system: macOS Big Sur (11.1), Chip: Apple M1

Python version: 3.8.6

Package versions: tensorflow_macos

Thanks!

huonw commented 3 years ago

Thanks for filing an issue. I'm currently also struggling with this, and aren't yet sure the best way to handle it. Potentially detecting when running on M1 and changing or removing the tensorflow dependency, but I haven't got this to work from a (very brief) basic test, yet.

huonw commented 3 years ago

I've made a start at #1860, but there's still some issues to work through that I haven't been able to do today.

huonw commented 3 years ago

@dokato noted in #1920 that the import can crash with "illegal hardware instruction" on M1.

divyam1408 commented 3 years ago

Hi, I am facing the same issue , is there a solution or workaround for it yet?

Thanks

FatemeMirzaeii commented 1 year ago

any solution for this issue?