Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.12k stars 4.15k forks source link

Import Error: incompatible architecture (have 'x86_64', need 'arm64e') #5754

Closed antoinekllee closed 2 years ago

antoinekllee commented 2 years ago

Hi everyone,

I'm having an issue when running mlagents-learn on an M1 Macbook Pro. There is an import error regarding incompatible architecture.

Traceback (most recent call last):
  File "/Users/antoinelee/Desktop/Unity/ESPR Asymmetrical Game 2/venv/bin/mlagents-learn", line 7, in <module>
    from mlagents.trainers.learn import main
  File "/Users/antoinelee/Desktop/Unity/ESPR Asymmetrical Game 2/venv/lib/python3.8/site-packages/mlagents/trainers/learn.py", line 2, in <module>
    from mlagents import torch_utils
  File "/Users/antoinelee/Desktop/Unity/ESPR Asymmetrical Game 2/venv/lib/python3.8/site-packages/mlagents/torch_utils/__init__.py", line 1, in <module>
    from mlagents.torch_utils.torch import torch as torch  # noqa
  File "/Users/antoinelee/Desktop/Unity/ESPR Asymmetrical Game 2/venv/lib/python3.8/site-packages/mlagents/torch_utils/torch.py", line 34, in <module>
    import torch  # noqa I201
  File "/Users/antoinelee/Desktop/Unity/ESPR Asymmetrical Game 2/venv/lib/python3.8/site-packages/torch/__init__.py", line 196, in <module>
    from torch._C import *
ImportError: dlopen(/Users/antoinelee/Desktop/Unity/ESPR Asymmetrical Game 2/venv/lib/python3.8/site-packages/torch/_C.cpython-38-darwin.so, 0x0002): tried: '/Users/antoinelee/Desktop/Unity/ESPR Asymmetrical Game 2/venv/lib/python3.8/site-packages/torch/_C.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/_C.cpython-38-darwin.so' (no such file), '/usr/lib/_C.cpython-38-darwin.so' (no such file)

Does anyone know a solution to this? Thank you!

miguelalonsojr commented 2 years ago

We currently do not have full support for M1 macs. We'll be looking into adding support over the next few quarters.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.