I tried installing everything needed, followed the docs.
- it says install python 3.7.2 or Higher. So I installed 3.10.9 (it was the lowest i could find).
- I tried installing PyTorch with “pip3 install torch~=1.7.1 -f https://download.pytorch.org/whl/torch_stable.html” than i got the first error[*1] it said there is now version 1.7 so I installed 1.11.0 (the lowest) this worked.
- than I used “pip install mlagents==0.30.0” how the docs said and got an error[*2] again so I installed 0.28.0 (the newest I could find) and it worked.
- than I tried “mlagents-learn --help” to check if everything works but it didn’t I got an error[*3] again. And this time I have no idea how to fix it.
Now I don’t know what to do is this all just a buggy outdated mess or am I doing something wrong? I also have like 50 Errors in unity after Importing the example project but I think I can fix them.
(Im using Win 11 and I also tried python 3.11)
[*1]
ERROR: No matching distribution found for torch~=1.7.1
[*2]
ERROR: Could not find a version that satisfies the requirement mlagents==0.30.0 (from versions: 0.4.0, 0.10.0.dev1, 0.10.0, 0.10.1, 0.11.0.dev0, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.17.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.24.0, 0.24.1, 0.25.0, 0.25.1, 0.26.0, 0.27.0, 0.28.0)
ERROR: No matching distribution found for mlagents==0.30.0
[*3]
(venv) D:\Programme\Unity\AiCat>mlagents-learn --help
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\Programme\Unity\AiCat\venv\Scripts\mlagents-learn.exe\__main__.py", line 4, in <module>
File "D:\Programme\Unity\AiCat\venv\lib\site-packages\mlagents\trainers\learn.py", line 2, in <module>
from mlagents import torch_utils
File "D:\Programme\Unity\AiCat\venv\lib\site-packages\mlagents\torch_utils\__init__.py", line 1, in <module>
from mlagents.torch_utils.torch import torch as torch # noqa
File "D:\Programme\Unity\AiCat\venv\lib\site-packages\mlagents\torch_utils\torch.py", line 6, in <module>
from mlagents.trainers.settings import TorchSettings
File "D:\Programme\Unity\AiCat\venv\lib\site-packages\mlagents\trainers\settings.py", line 644, in <module>
class TrainerSettings(ExportableSettings):
File "D:\Programme\Unity\AiCat\venv\lib\site-packages\mlagents\trainers\settings.py", line 667, in TrainerSettings
cattr.register_structure_hook(
File "D:\Programme\Unity\AiCat\venv\lib\site-packages\cattr\converters.py", line 207, in register_structure_hook
self._structure_func.register_cls_list([(cl, func)])
File "D:\Programme\Unity\AiCat\venv\lib\site-packages\cattr\dispatch.py", line 55, in register_cls_list
self._single_dispatch.register(cls, handler)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\functools.py", line 856, in register
raise TypeError(
TypeError: Invalid first argument to `register()`. typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class.