Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question mlagents-learn not recognized as a command when project is on a different drive

Discussion in 'ML-Agents' started by GamesbyJP, Dec 28, 2020.

  1. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    62
    Hello everyone,

    I'm running into an issue with the mlagents-learn command not being recognized when my unity project is on my D: drive. I don't have this issue when I run the command if the unity project is on my C: (main) drive.

    In both instances, I use CMD to run:
    1) cd 'project directory'
    2) venv\Scripts\activate
    3) mlagents-learn

    I'm not entirely sure what's causing this, any ideas?
     
  2. jeffrey_unity538

    jeffrey_unity538

    Unity Technologies

    Joined:
    Feb 15, 2018
    Posts:
    59
    hi Jan - i'm not a Windows expert, but I don't believe you can use virtual environments on different disks or networks drives on Windows. You might need to install Python on the D:\ resolve this.
     
  3. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    62
    Hello Jeffrey, thanks for the reply.
    While the python installer gave an error because it was already installed on my system, your anser inspired me to try the following:

    I added my python install directory to the system environment variables as explained here:
    https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path

    In case others run into this problem:
    The default directory for Python 3.7, which you should add to the system environment variables is this: C:\Users\Username\AppData\Local\Programs\Python\Python37.

    You can consider this question solved, thanks!
     
  4. jeffrey_unity538

    jeffrey_unity538

    Unity Technologies

    Joined:
    Feb 15, 2018
    Posts:
    59