mlgagents-learn --help doesn't display commands

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
File “C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\learn.py”, line 13, in
from mlagents.trainers.trainer_controller import TrainerController
File “C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\trainer_controller.py”, line 13, in
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
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
from mlagents.trainers.stats import StatsReporter
File “C:\Unity Project\MLagent\venv\lib\site-packages\mlagents\trainers\stats.py”, line 14, in
from torch.utils.tensorboard import SummaryWriter
File "C:\Unity Project\MLagent\venv\lib\site-packages\torch\utils\tensorboard_init
.py", line 2, in
from packaging.version import Version
ModuleNotFoundError: No module named ‘packaging’

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

pip install packaging

Yeah, it was evident :slight_smile: It works. Thanks a lot.