Search Unity

MacOS m1 Big Sur - Can't Install ml-agents Python package

Discussion in 'ML-Agents' started by dginovker, Jul 5, 2021.

  1. dginovker

    dginovker

    Joined:
    Sep 25, 2020
    Posts:
    8
    I've tried using `pyenv` to change my Python version to a bunch of different 3.6.x, 3.7.x and 3.8.x versions, but nothing can install the ml-agents package. Some Python versions can't install Pillow, some can't install h5py, some can't install numpy, etc etc etc. It's just a big nightmare.

    Right now I'm trying to install it locally from the git repo per the Installation.md instructions, but it wants to run `pip3 install -e ./ml-agents-envs` (which unlike `ml-agents` isn't a public repo in github.com/Unity-Technologies), so I'm not sure if it'll work. I'll edit the post with my findings shortly.

    Other than that, I'm out of ideas. Has anyone here successfully installed mlagents on Big Sur?
     
  2. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi,
    We have no control over which python packages have native M1 support. I am working on a playbook to get people up and running on M1 but it’s not ready just yet. You can try and install the python packages you need by prefixing your pip install commands with arch -arch x86_64
     
    DrViJ likes this.
  3. andreialbu03

    andreialbu03

    Joined:
    Nov 28, 2021
    Posts:
    2
    Hello,
    I am facing the exact same issue of not being able to install ml-agents when I used the command pip3 install mlagents on m1.
    Were you able to find a way to download it?
     
  4. parssa

    parssa

    Joined:
    Dec 27, 2017
    Posts:
    2
    Hi,

    I've also been facing this issue as well, is there any current way to install mlagents on an M1 based mac?
     
  5. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    DrViJ likes this.
  6. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    163
    Thank you so much for these instructions