Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question How to install and setup ML Agents 2.3.0

Discussion in 'ML-Agents' started by bhunterd, Apr 21, 2023.

  1. bhunterd

    bhunterd

    Joined:
    Oct 6, 2016
    Posts:
    43
    Hello, can somebody give me step by step instruction of installation all python stufs to make ML Agents 2.3.0 work. I try 3.8.0 python and it is not working also try 3.11.3 it also is not working. Is there maybe link on guide how to install and setup all of this features.
     
  2. ucax217

    ucax217

    Joined:
    Nov 8, 2018
    Posts:
    8
  3. bhunterd

    bhunterd

    Joined:
    Oct 6, 2016
    Posts:
    43
    I followed that installation doc and I can't install it I always got the errors. I even try to install it via Anaconda and have errors.
     
  4. ucax217

    ucax217

    Joined:
    Nov 8, 2018
    Posts:
    8
    maybe you should post the error because like that is is vague ... is it a python erreor ? an unity error ? an error during installation ? during training ?
     
  5. bhunterd

    bhunterd

    Joined:
    Oct 6, 2016
    Posts:
    43
    I figured how to setup everything thanks to this links:
    -------------------------------------------------------------------------------------------------------------------------
    I follow this tutorial:
    youtube.com/watch?v=Yix4iV_io6o&t=91s
    -------------------------------------------------------------------------------------------------------------------------

    Modified the required versions:
    https://github.com/Unity-Technologies/ml-agents/issues/5826
    ------------------------------------------------------------------------------------
    TheRisenPhoenix commented on Jan 25
    Currently, you have to clone the repository, and adjust the following lines:
    In ml-agents/setup.py:
    python_requires=">=3.8.13,<3.11.0" (line 82)

    In ml-agents-envs/setup.py:
    "numpy>=1.14.1,<1.24" (line 54)
    and
    python_requires=">=3.8.13,<3.11.0" (line 63)

    and delete "numpy==1.21.2" (line 60)

    Then, first install torch using your needed configuration (https://pytorch.org/get-started/locally/) and then install your locally changed python packages:

    pip3 install -e ./ml-agents-envs
    pip3 install -e ./ml-agents
    ------------------------------------------------------------------------------------
    Used commands from:
    https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Installation.md

    ------------------------------------------------------------------------------------------------------------------
    and then used command -
    pip install protobuf==3.20
    -------------------------------------------------------------------------------------------------------------------

    And now evrithing is woking.
     
  6. bhunterd

    bhunterd

    Joined:
    Oct 6, 2016
    Posts:
    43
    I googled each errors and found solutions in google, I posted guide above.