Search Unity

Question mlgagents-learn --help doesn't display commands

Discussion in 'ML-Agents' started by sefaertunc, Dec 9, 2023.

  1. sefaertunc

    sefaertunc

    Joined:
    Oct 28, 2019
    Posts:
    4
    I installed ML Agent by watching a video on YouTube (below):

    Python version: 3.9.13
    Numpy version: 1.21.2
    Protobuf version: 3.20.3




    Everything seemed normal but I checked whether it worked or not at the end of the process. When I tried to look with "mlagents-learn --help", it didn't display commands that are evidence to show "everything is alright".
    Instead, I encountered the messages below:

    C:\Unity Project\MLagent\venv\lib\site-packages\torch\__init__.py:614: UserWarning: torch.set_default_tensor_type() is deprecated as of PyTorch 2.1, please use torch.set_default_dtype() and torch.set_default_device() as alternatives. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\tensor\python_tensor.cpp:453.)
    _C._set_default_tensor_type(t)
    Traceback (most recent call last):
    File "C:\Users\sefae\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "C:\Users\sefae\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "C:\Unity Project\MLagent\venv\Scripts\mlagents-learn.exe\__main__.py", line 4, in <module>
    File "C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\learn.py", line 13, in <module>
    from mlagents.trainers.trainer_controller import TrainerController
    File "C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\trainer_controller.py", line 13, in <module>
    from mlagents.trainers.env_manager import EnvManager, EnvironmentStep
    File "C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\env_manager.py", line 13, in <module>
    from mlagents.trainers.agent_processor import AgentManager, AgentManagerQueue
    File "C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\agent_processor.py", line 23, in <module>
    from mlagents.trainers.stats import StatsReporter
    File "C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\stats.py", line 14, in <module>
    from torch.utils.tensorboard import SummaryWriter
    File "C:\Unity Project\MLagent\venv\lib\site-packages\torch\utils\tensorboard\__init__.py", line 2, in <module>
    from packaging.version import Version
    ModuleNotFoundError: No module named 'packaging'

    Ekran görüntüsü 2023-12-09 181827.png

    What is the solution for this problem to use ML Agent ?
     
  2. smallg2023

    smallg2023

    Joined:
    Sep 2, 2018
    Posts:
    144
    pip install packaging
     
  3. sefaertunc

    sefaertunc

    Joined:
    Oct 28, 2019
    Posts:
    4
    Yeah, it was evident :) It works. Thanks a lot.