Later I found the workaround described in this thread, and it solved the situation:
#5794
pip install importlib-metadata==4.4
Never-the-less, either the bug should be corrected, or the instructions updated. I spent hours trying to install mlagents and getting different errors due to version incompatibilities which are not documented...
这是一个Bug
通过安装importlib-metadata可以解决:
pip install importlib-metadata==4.4