Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Bug pip installation ml agents 0.30 does not work

Discussion in 'ML-Agents' started by arjanM, Dec 15, 2022.

  1. arjanM

    arjanM

    Joined:
    Oct 4, 2016
    Posts:
    4
    Hi, I run in to problems trying to set up ML-agents on my machine.
    I wanted to try MLagents again after awhile now using the python virtual environment instead of conda.
    At first I already run in to the problem that the recommended install of pytorch is 4 years old and not available anymore. I then installed a version that is a little bit more recent.
    But then when I want to pip install ml agents 0.30 I ran into a error with the version of numpy it wants to install.
    I tried it with the recommended version of python 3.7.2 and 3.10
    But I can't get it to work.
    Although there is new documentation but the installation contents seems really outdated.
    Does anybody know of a solution or a workaround?
     
    GamerLordMat likes this.
  2. hughperkins

    hughperkins

    Joined:
    Dec 3, 2022
    Posts:
    191
    On a Mac, here's what I have:

    Code (csharp):
    1.  
    2. (10-unityml) Hughs-MacBook-Air:python hugh$ python -V
    3. Python 3.10.7
    4. (10-unityml) Hughs-MacBook-Air:python hugh$ pip freeze | grep 'torch|agents'
    5. (10-unityml) Hughs-MacBook-Air:python hugh$ pip freeze | egrep 'torch|agents'
    6. -e git+ssh://git@github.com/Unity-Technologies/ml-agents.git@89a6357016f4bd685bb0004f83a3a1c2b27a0e05#egg=mlagents&subdirectory=ml-agents
    7. mlagents-envs==0.30.0
    8. torch==1.11.0
    9. (10-unityml) Hughs-MacBook-Air:python hugh$ pip freeze | egrep 'torch|agents|numpy'
    10. -e git+ssh://git@github.com/Unity-Technologies/ml-agents.git@89a6357016f4bd685bb0004f83a3a1c2b27a0e05#egg=mlagents&subdirectory=ml-agents
    11. mlagents-envs==0.30.0
    12. numpy==1.21.2
    13. torch==1.11.0
    14.  
     
  3. HContainer

    HContainer

    Joined:
    Oct 7, 2017
    Posts:
    1
    I faced the same problem with python version 3.10.9
    and checked the error prompted out while installing

    0.30.0 Requires-Python >=3.8.13,<=3.10.8

    Hence, change the python version to 3.10.8 shall work
     
    hughperkins likes this.