Error when trying to run mlagents-learn

Im kinda new to Unity so I may have done something wrong. But I did follow the installation guide from start to finish. My guess is I did something wrong in the part python package install, although I did follow that aswell.
However when I try to run the mlagents-learn command mlagents-learn config/ppo/3DBall.yaml --run-id=first3DBallRun in cmd I get the following error.

Traceback (most recent call last):
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
File “c:\users\emiln\appdata\local\programs\python\python37\lib\imp.py”, line 242, in load_module
return load_dynamic(name, filename, file)
File “c:\users\emiln\appdata\local\programs\python\python37\lib\imp.py”, line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Cannot find the assigned module.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\EmilN\AppData\Local\Programs\Python\Python37\Scripts\mlagents-learn-script.py”, line 11, in
load_entry_point(‘mlagents’, ‘console_scripts’, ‘mlagents-learn’)()
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\pkg_resources_init_.py”, line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\pkg_resources_init_.py”, line 2852, in load_entry_point
return ep.load()
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\pkg_resources_init_.py”, line 2443, in load
return self.resolve()
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\pkg_resources_init_.py”, line 2449, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “d:\unity stuff\ml-agents-master\ml-agents-master\ml-agents\mlagents\trainers\learn.py”, line 13, in
from mlagents import tf_utils
File “d:\unity stuff\ml-agents-master\ml-agents-master\ml-agents\mlagents\tf_utils_init_.py”, line 1, in
from mlagents.tf_utils.tf import tf as tf # noqa
File “d:\unity stuff\ml-agents-master\ml-agents-master\ml-agents\mlagents\tf_utils\tf.py”, line 3, in
import tensorflow as tf # noqa I201
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init_.py”, line 101, in
from tensorflow_core import *
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core_init_.py”, line 40, in
from tensorflow.python.tools import module_util as module_util
File "c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init
.py", line 50, in getattr
module = self.load()
File "c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_init
.py", line 44, in _load
module = importlib.import_module(self.name)
File "c:\users\emiln\appdata\local\programs\python\python37\lib\importlib_init
.py", line 127, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python_init
.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “c:\users\emiln\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
File “c:\users\emiln\appdata\local\programs\python\python37\lib\imp.py”, line 242, in load_module
return load_dynamic(name, filename, file)
File “c:\users\emiln\appdata\local\programs\python\python37\lib\imp.py”, line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Cannot find the assigned module.

Given the error messages I am assuming the issue is with Python. Quick notes aswell, im not in a virtual environment, not sure if this matters. I just wanted to do some simple tests for a thesis project. Also is there a way to pull graphs out from the training session?

I’ll flag this for the team to investigate. Which version of ML Agents, C#, and Python are you using?

3.7 for Python.
ML agents should be April 30, 2020 release. Atleast one of the latests ones. Could be master release.
C# is whatever is standard in the Unity version 2019.3.12f1.

Please see this tensorflow github issue. You’ll need to install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019.

Seems to be working now for the most part. Atleast the training runs, although it does pop up some error looking messages before the training starts.

2020-06-02 11:23:03.933799: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 970 computeCapability: 5.2
coreClock: 1.253GHz coreCount: 13 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 208.91GiB/s
2020-06-02 11:23:03.948309: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
2020-06-02 11:23:03.958275: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cublas64_10.dll’; dlerror: cublas64_10.dll not found
2020-06-02 11:23:03.968199: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cufft64_10.dll’; dlerror: cufft64_10.dll not found
2020-06-02 11:23:03.978077: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘curand64_10.dll’; dlerror: curand64_10.dll not found
2020-06-02 11:23:03.987569: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cusolver64_10.dll’; dlerror: cusolver64_10.dll not found
2020-06-02 11:23:03.997727: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cusparse64_10.dll’; dlerror: cusparse64_10.dll not found
2020-06-02 11:23:04.008094: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudnn64_7.dll’; dlerror: cudnn64_7.dll not found
2020-06-02 11:23:04.016352: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1592] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices…

Not sure if these are an issue or if I can just ignore them. Alas atleast the training runs.

You can ignore them. But you can fix them by installing the nvidia CUDA libraries. As the error message says, you can follow: Instale o TensorFlow com pip