For training the environment on Release 17, I followed these guide:
# Installation
The ML-Agents Toolkit contains several components:
- Unity package ([`com.unity.ml-agents`](../com.unity.ml-agents/)) contains the
Unity C# SDK that will be integrated into your Unity project. This package contains
a sample to help you get started with ML-Agents.
- Unity package
([`com.unity.ml-agents.extensions`](../com.unity.ml-agents.extensions/))
contains experimental C#/Unity components that are not yet ready to be part
of the base `com.unity.ml-agents` package. `com.unity.ml-agents.extensions`
has a direct dependency on `com.unity.ml-agents`.
- Two Python packages:
- [`mlagents`](../ml-agents/) contains the machine learning algorithms that
enables you to train behaviors in your Unity scene. Most users of ML-Agents
will only need to directly install `mlagents`.
- [`mlagents_envs`](../ml-agents-envs/) contains a set of Python APIs to interact with
a Unity scene. It is a foundational layer that facilitates data messaging
between Unity scene and the Python machine learning algorithms.
Consequently, `mlagents` depends on `mlagents_envs`.
This file has been truncated. show original
# Getting Started Guide
This guide walks through the end-to-end process of opening one of our
[example environments](Learning-Environment-Examples.md) in Unity, training an
Agent in it, and embedding the trained model into the Unity environment. After
reading this tutorial, you should be able to train any of the example
environments. If you are not familiar with the
[Unity Engine](https://unity3d.com/unity), view our
[Background: Unity](Background-Unity.md) page for helpful pointers.
Additionally, if you're not familiar with machine learning, view our
[Background: Machine Learning](Background-Machine-Learning.md) page for a brief
overview and helpful pointers.
![3D Balance Ball](images/balance.png)
For this guide, we'll use the **3D Balance Ball** environment which contains a
number of agent cubes and balls (which are all copies of each other). Each agent
cube tries to keep its ball from falling by rotating either horizontally or
vertically. In this environment, an agent cube is an **Agent** that receives a
reward for every step that it balances the ball. An agent is also penalized with
This file has been truncated. show original
But, when I run mlagents-learn
command, this error happened:
Traceback (most recent call last):
File "C:\Users\Yuulis\anaconda3\envs\mlagents2\Scripts\mlagents-learn-script.py", line 33, in <module>
sys.exit(load_entry_point('mlagents', 'console_scripts', 'mlagents-learn')())
File "C:\Users\Yuulis\anaconda3\envs\mlagents2\Scripts\mlagents-learn-script.py", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
AttributeError: 'PathDistribution' object has no attribute 'entry_points'
In fact, the same error happened when I tried on Release 12. At that time, I downloaded GitHub - Unity-Technologies/ml-agents at release_12_branch instead of GitHub - Unity-Technologies/ml-agents at release_12_docs and I solved the problem.
But this time, I downloaded GitHub - Unity-Technologies/ml-agents at release_17_branch , so maybe it doesn’t cause problem. Where is the problem?
・I created a virtual environment "mlagents2" for python 3.6.7 with Anaconda3.
・I downloaded Release 17's branch.
・I ran the following commands in sequence on Anaconda3:
```
(mlagents2) C:\Users\Yuulis>pip install torch==1.7.1 -f https://download.pytorch.org/whl/torch_stable.html
(mlagents2) C:\Users\Yuulis>cd C:\Users\Yuulis\ML-Agents\ml-agents-release_17_branch
(mlagents2) C:\Users\Yuulis>cd ml-agents-envs
(mlagents2) C:\Users\Yuulis>pip install -e .
(mlagents2) C:\Users\Yuulis>cd ..
(mlagents2) C:\Users\Yuulis>cd ml-agents
(mlagents2) C:\Users\Yuulis>pip install -e .
```
And I checked these packages installed:
mlagents==0.26.0
mlagents-envs==0.26.0
torch==1.7.1+cu110
hi @Yuulis04 ,
Have is mlagents-learn installed in your global environment and leaking into your virtual env? Could you make sure it is completely uninstalled and try again?
How can I check “leaking into virtual env”?
On windows you can use:
where mlagents-learn
To see where the executable lives. If the path returned from that command isn’t in your virtual environment, it may mean mlagents-learn is installed in your global environment.
christophergoy:
On windows you can use:
where mlagents-learn
To see where the executable lives. If the path returned from that command isn’t in your virtual environment, it may mean mlagents-learn is installed in your global environment.
@christophergoy
The path returned like this:
C:\Users\yuulis\anaconda3\envs\mlagents2\Scripts\mlagents-learn.exe
Is this place correct?
In the case of Release 12, which works fine, like this:
C:\Users\Yuulis\anaconda3\envs\ml-agents\Scripts\mlagents-learn.exe