ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

Support for M1 Macs that can't install pytorch < 1.9.0

Open bbusche opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. Using python 3.9.13, I cannot get pip to install a version of pytorch < 1.9.0 on an M1 Mac Monterey 12.6

Describe the solution you'd like If ml-agents can successfully use pytorch >= 1.9.0 as a dependency, please increase the required pytorch version number so pip doesn't error with this output: The conflict is caused by: mlagents 0.29.0 depends on torch<1.9.0 and >=1.8.0; platform_system != "Windows" and python_version >= "3.9"

Describe alternatives you've considered I have tried installing older versions of pytorch, within the torch<1.9.0 and >=1.8.0 constraint. This fails on M1 Mac Monterey 12.6

Additional context

bbusche avatar Oct 07 '22 16:10 bbusche

@bbusche I got a working ml-agents on Apple M2 (Monterey) using Python 3.10.7 and PyTorch stable (1.12.1). I had to clone the ml-agents repos and change ml-agents/ml-agents/setup.py to:

"torch>=1.8.0,<=1.12.0;(platform_system!='Windows' and python_version>='3.9')"

Then pip install -e path/to/clone/of/ml-agents.

automata avatar Oct 11 '22 02:10 automata

I feel like this has been fixed in release_20? https://github.com/Unity-Technologies/ml-agents/blob/5b6cb9878c611d5c50585f6400ebb8fe16ee8f1f/ml-agents/setup.py#L71

Screen Shot 2022-12-17 at 4 36 28 PM

hughperkins avatar Dec 17 '22 21:12 hughperkins

I am getting the same issue

Eatin8 avatar Jun 02 '23 22:06 Eatin8

I am getting the same issue

Arlen0615 avatar Jun 14 '23 05:06 Arlen0615