Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    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.

Having trouble setting up Python environment.

Discussion in 'ML-Agents' started by Jason-K, Jun 16, 2020.

  1. Jason-K


    Dec 1, 2014
    I found instructions for setting up a the Python environment for using ml agents on windows here ( I think I followed the instructions correctly, but I am getting errors so obviously I did not. Can anyone help me figure out what I did wrong? I am brand new to Python so I may be missing something that is obvious to others. Errors are shown in bold.

    I downloaded the latest version of Python (3.8.3). I then ran:
    pip3 install mlagents_env
    pip3 install gym_unity
    pip3 install mlagents

    When I run pip3 install mlagents I see this error at the end:
    Collecting tensorflow<3.0,>=1.7 (from mlagents)
    ERROR: Could not find a version that satisfies the requirement tensorflow<3.0,>=1.7 (from mlagents) (from versions: none)
    ERROR: No matching distribution found for tensorflow<3.0,>=1.7 (from mlagents)
    WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.

    When I try to run >mlagents-learn --help to test my installation I get this error:
    C:\Users\Game Dev>mlagents-learn --help
    'mlagents-learn' is not recognized as an internal or external command,
    operable program or batch file.

    Any help or advice would be appreciated.

    *** Possibly Solved ***

    It looks like Tensorflow isn't compatible with the latest version of Python (3.8). I uninstalled Python and installed version 3.7. So far things are looking better. I'll post again once I've confirmed that this works in case anyone else finds this thread while looking for a solution to the same problem.
    Last edited: Jun 16, 2020
  2. celion_unity


    Jun 12, 2019
    The latest version of tensorflow (2.2.0) should be compatible with python 3.8, so I'm surprised it was giving you errors. But glad that using python 3.7 seems to be working.