AttributeError: 'PathDistribution' object has no attribute 'entry_points'

For training the environment on Release 17, I followed these guide:

But, when I run mlagents-learncommand, 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
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