Repository: stellargraph/stellargraph

Issue #1856: Use stellargraph with tensorflow_macos on Mac M1
Created: 2021-01-30T09:29:33Z
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:

Working with miniforge, installed python==3.8.6 and tensorflow_macos
Clone stellargraph/stellargraph.
cd stellargraph/
pip install .
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!

Duplicate issue #1920: stellargraph on mac m1
Created: 2021-05-14T13:27:25Z
Describe the bug
I get the following error while importing
In [1]: import stellargraph as sg
[1]    47985 illegal hardware instruction  ipython
To Reproduce
See above. I'm using Python 3.7.10 on Mac M1.
Observed behavior
Import crashes ipython kernel.
Expected behavior
It doesn't ;)
Environment
macOS BigSur 11.2.3.
Python version: 3.7.10
Package versions: I used clean conda environment and called pip install stellargraph, so all should be updated.

absl-py @ file:///opt/concourse/worker/volumes/live/369745d3-6991-42a3-71cb-795aa3d79471/volume/absl-py_1615411186320/work
aiohttp @ file:///opt/concourse/worker/volumes/live/156ebd32-9ad6-4f45-4f62-23f91a325769/volume/aiohttp_1614360976709/work
appnope @ file:///opt/concourse/worker/volumes/live/4f734db2-9ca8-4d8b-5b29-6ca15b4b4772/volume/appnope_1606859466979/work
argon2-cffi @ file:///opt/concourse/worker/volumes/live/c4db8eed-7de0-4d68-400c-2ea7e21d3750/volume/argon2-cffi_1596828478065/work
astor==0.8.1
astunparse==1.6.3
async-generator==1.10
async-timeout==3.0.1
attrs @ file:///tmp/build/80754af9/attrs_1620827162558/work
backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work
bleach @ file:///tmp/build/80754af9/bleach_1600439572647/work
boto3 @ file:///tmp/build/80754af9/boto3_1617902877650/work
botocore @ file:///tmp/build/80754af9/botocore_1620623655540/work
brotlipy==0.7.0
cached-property==1.5.2
cachetools @ file:///tmp/build/80754af9/cachetools_1619597386817/work
certifi==2020.6.20
cffi @ file:///opt/concourse/worker/volumes/live/ca3c0fea-9d0f-4489-6889-89b42078ed37/volume/cffi_1613246931142/work
chardet @ file:///opt/concourse/worker/volumes/live/92aa0fea-cec8-43da-4d77-2574e78c5981/volume/chardet_1605303181342/work
coverage @ file:///opt/concourse/worker/volumes/live/4f1a5e30-f675-4496-6570-bc6669a34f2a/volume/coverage_1614614860186/work
cryptography @ file:///opt/concourse/worker/volumes/live/cdf8ff17-b0bf-4081-524c-b5a0afe929ba/volume/cryptography_1616769280208/work
cycler==0.10.0
Cython @ file:///opt/concourse/worker/volumes/live/203a63af-5d69-4f3f-44a3-6968eb710a6a/volume/cython_1618435144870/work
decorator @ file:///tmp/build/80754af9/decorator_1620904181799/work
defusedxml==0.6.0
entrypoints==0.3
flatbuffers==1.12
gast @ file:///tmp/build/80754af9/gast_1597433534803/work
gensim @ file:///opt/concourse/worker/volumes/live/e9819176-eb19-41f8-6442-3c7943d8c58e/volume/gensim_1613994444071/work
google-api-core @ file:///C:/ci/google-api-core-split_1613980333946/work
google-auth @ file:///tmp/build/80754af9/google-auth_1619477128713/work
google-auth-oauthlib==0.4.4
google-cloud-core @ file:///tmp/build/80754af9/google-cloud-core_1613414810663/work
google-cloud-storage @ file:///tmp/build/80754af9/google-cloud-storage_1619635655054/work
google-crc32c @ file:///opt/concourse/worker/volumes/live/0de1005b-9091-4e72-56c6-7ebd9557635b/volume/google-crc32c_1612242925405/work
google-pasta==0.2.0
google-resumable-media @ file:///tmp/build/80754af9/google-resumable-media_1608056254223/work
googleapis-common-protos @ file:///opt/concourse/worker/volumes/live/a9866c56-bd78-47e9-7316-430b13968ffd/volume/googleapis-common-protos-feedstock_1617957629478/work
grpcio==1.34.1
h5py==3.1.0
idna @ file:///home/linux1/recipes/ci/idna_1610986105248/work
importlib-metadata @ file:///opt/concourse/worker/volumes/live/4e25a0be-45cc-4b73-4314-4604f00e30a4/volume/importlib-metadata_1617877365451/work
ipykernel @ file:///opt/concourse/worker/volumes/live/73e8766c-12c3-4f76-62a6-3dea9a7da5b7/volume/ipykernel_1596206701501/work/dist/ipykernel-5.3.4-py3-none-any.whl
ipython @ file:///opt/concourse/worker/volumes/live/f33fa11b-d908-43e8-693a-f4b58d8c695c/volume/ipython_1617120878195/work
ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work
ipywidgets @ file:///tmp/build/80754af9/ipywidgets_1601490159889/work
jedi==0.17.0
Jinja2==2.11.2
jmespath @ file:///tmp/build/80754af9/jmespath_1594304593830/work
joblib @ file:///tmp/build/80754af9/joblib_1613502643832/work
jsonschema==3.0.2
jupyter==1.0.0
jupyter-client @ file:///tmp/build/80754af9/jupyter_client_1616770841739/work
jupyter-console @ file:///tmp/build/80754af9/jupyter_console_1598884538475/work
jupyter-core @ file:///opt/concourse/worker/volumes/live/a699b83f-e941-4170-5136-bf87e3f37756/volume/jupyter_core_1612213304212/work
jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work
Keras-Applications @ file:///tmp/build/80754af9/keras-applications_1594366238411/work
keras-nightly==2.5.0.dev2021032900
Keras-Preprocessing @ file:///tmp/build/80754af9/keras-preprocessing_1612283640596/work
kiwisolver @ file:///opt/concourse/worker/volumes/live/1e6d28e8-da14-4365-7344-567a05db7efc/volume/kiwisolver_1612282399491/work
Markdown @ file:///opt/concourse/worker/volumes/live/255f8945-2411-4469-7c82-a749af3aef33/volume/markdown_1614363822772/work
MarkupSafe==1.1.1
matplotlib @ file:///opt/concourse/worker/volumes/live/41e8cd50-031f-4dda-5787-dd3c4f4e0f08/volume/matplotlib-suite_1613407855571/work
mistune==0.8.4
mkl-fft==1.3.0
mkl-random @ file:///opt/concourse/worker/volumes/live/45391dab-1d51-4226-600a-9065613b835f/volume/mkl_random_1618853975662/work
mkl-service==2.3.0
multidict @ file:///opt/concourse/worker/volumes/live/916fad11-7ad6-4d5b-6bed-62dd814c4c78/volume/multidict_1607367774261/work
nbclient @ file:///tmp/build/80754af9/nbclient_1602783176460/work
nbconvert @ file:///opt/concourse/worker/volumes/live/d4b0787b-b6c8-4d28-5453-3381885d5b33/volume/nbconvert_1601914848300/work
nbformat @ file:///tmp/build/80754af9/nbformat_1602783287752/work
nest-asyncio @ file:///tmp/build/80754af9/nest-asyncio_1601499549014/work
networkx==2.3
notebook @ file:///opt/concourse/worker/volumes/live/d2f310db-b6ef-49ca-4ff6-cbb3a628fe1d/volume/notebook_1601501569294/work
numpy==1.19.5
oauthlib==3.1.0
olefile==0.46
opt-einsum==3.3.0
packaging==20.4
pandas==1.2.4
pandocfilters==1.4.2
parso @ file:///tmp/build/80754af9/parso_1617223946239/work
pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work
pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work
Pillow @ file:///opt/concourse/worker/volumes/live/0aff898a-aba9-4321-76c2-58d629e96356/volume/pillow_1617386155885/work
prometheus-client==0.8.0
prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1616415428029/work
protobuf==3.14.0
ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work
Pygments @ file:///tmp/build/80754af9/pygments_1615143339740/work
pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1608057966937/work
pyparsing @ file:///home/linux1/recipes/ci/pyparsing_1610983426697/work
pyrsistent @ file:///opt/concourse/worker/volumes/live/656e0c1b-ef87-4251-4a51-1290b2351993/volume/pyrsistent_1600141745371/work
PySocks @ file:///opt/concourse/worker/volumes/live/ef943889-94fc-4539-798d-461c60b77804/volume/pysocks_1605305801690/work
python-dateutil @ file:///home/ktietz/src/ci/python-dateutil_1611928101742/work
pytz @ file:///tmp/build/80754af9/pytz_1612215392582/work
pyzmq==20.0.0
qtconsole @ file:///tmp/build/80754af9/qtconsole_1600870028330/work
QtPy==1.9.0
requests @ file:///tmp/build/80754af9/requests_1608241421344/work
requests-oauthlib==1.3.0
rsa @ file:///tmp/build/80754af9/rsa_1614366226499/work
s3transfer @ file:///tmp/build/80754af9/s3transfer_1616183147336/work
scikit-learn @ file:///opt/concourse/worker/volumes/live/4b416fcf-2a1b-4a30-781a-c588a35f6ca3/volume/scikit-learn_1614446663856/work
scipy @ file:///opt/concourse/worker/volumes/live/a038d231-fbb5-4cf5-6b71-513b1c94ddce/volume/scipy_1618855950518/work
Send2Trash==1.5.0
sip==4.19.24
six @ file:///opt/concourse/worker/volumes/live/f983ba11-c9fe-4dff-7ce7-d89b95b09771/volume/six_1605205318156/work
smart-open @ file:///tmp/build/80754af9/smart_open_1617288398023/work
stellargraph==0.10.0
tensorboard==2.5.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.5.0
tensorflow-estimator==2.5.0
termcolor==1.1.0
terminado==0.9.1
testpath==0.4.4
threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl
tornado @ file:///opt/concourse/worker/volumes/live/d531d395-893c-4ca1-6a5f-717b318eb08c/volume/tornado_1606942307627/work
traitlets @ file:///home/ktietz/src/ci/traitlets_1611929699868/work
typing-extensions @ file:///tmp/build/80754af9/typing_extensions_1611751222202/work
urllib3 @ file:///tmp/build/80754af9/urllib3_1615837158687/work
wcwidth @ file:///tmp/build/80754af9/wcwidth_1593447189090/work
webencodings==0.5.1
Werkzeug @ file:///home/ktietz/src/ci/werkzeug_1611932622770/work
widgetsnbextension==3.5.1
wrapt==1.12.1
yarl @ file:///opt/concourse/worker/volumes/live/33e35c6f-e0f3-4e8f-41a6-47322106cfc8/volume/yarl_1598045184895/work
zipp @ file:///tmp/build/80754af9/zipp_1615904174917/work

Closing comment (2021-05-16T22:42:52Z): Thanks for filing a bug. Unfortunately I think tensorflow isn't officially available for M1 macs. I've started trying to get it working in #1860, but haven't yet succeeded.
Also, this is a duplicate of #1856, so I'm going to close.