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.

MLAgents package install problem

Discussion in 'ML-Agents' started by Xysch, Feb 19, 2020.

  1. Xysch

    Xysch

    Joined:
    Sep 2, 2013
    Posts:
    9
    Hello everyone,
    So I've been trying to install ML Agents and have encountered an error which has stumped me.
    As of right now, I can get the sample project to work and run both for training and from inference. However, when I open up the code I get errors with all ML Agent stuff but it worked. Unity seems to ignore the errors and still runs regardless.
    When I try to create my own agent in my project, I get the same errors present in the sample project but Unity doesn't ignore them and they show up in the console and as a result the game won't run.
    I've followed the instructions step by step twice, uninstalling everything and trying again. I've also attempted deleting the library and rebuilding it. I've also removed the package and re-added it in the package manager and can add MLAgents code in the Inspector at add component.
    I'm unsure of why I can run training and inference in the sample project however not even compile in my own.
    Is there something I'm missing?
    I currently have Python 3.6 and Unity 2019.2.8f1.
    Any suggestions are welcomed. Thank you! SampleMLCode.JPG MyMLAgentCode.JPG
     
  2. celion_unity

    celion_unity

    Unity Technologies

    Joined:
    Jun 12, 2019
    Posts:
    289
  3. Xysch

    Xysch

    Joined:
    Sep 2, 2013
    Posts:
    9
  4. Xysch

    Xysch

    Joined:
    Sep 2, 2013
    Posts:
    9
    I've also tried installing using both methods including anaconda
     
  5. Xysch

    Xysch

    Joined:
    Sep 2, 2013
    Posts:
    9
    FIXED: Class cannot be named MLAgent
     
  6. guidosalimbeni

    guidosalimbeni

    Joined:
    Nov 10, 2017
    Posts:
    17
    Hi, I have the same issue ... updating from a previous version of ML-agents - using Unity latest release and Ml-agents latest release .. can you explain how you fixed?
     
  7. Kingsmen99

    Kingsmen99

    Joined:
    Feb 4, 2021
    Posts:
    2
    I am having the same issue as this person. I followed countless install videos, tried the installation instruction hundreds of times at this point. I cannot for the life of me figure out this issue.
     
  8. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi @Kingsmen99 ,
    Have you tried to install ML-Agents from the package manager?