mlagents-learn and Windows Server 2019 Errors

Good day, I have been successful installing ML Agents on Windows 10 machines but now I am having a problem installing this on Windows Server 2019

The install mimics my Win 10 versions with Python 3.6

There are no installation errors and the Unity EXE runs fine on the server.

When I call the mlagents-learn or tensorboard I get a slew of errors.

This is from the mlagents-learn log.

Any thoughts about how I can resolve this one? :slight_smile:

C:\mlagents>mlagents-learn config/EnemyAI.yaml --no-graphics --run-id=EnemyBehavior --env “c:\EnemyAI\EnemyAI”
Traceback (most recent call last):
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
File “c:\users\administrator\appdata\local\programs\python\python36\lib\imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “c:\users\administrator\appdata\local\programs\python\python36\lib\imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “c:\users\administrator\appdata\local\programs\python\python36\lib\runpy.py”, line 193, in run_module_as_main
main”, mod_spec)
File “c:\users\administrator\appdata\local\programs\python\python36\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\Scripts\mlagents-learn.exe_main
.py", line 4, in
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\mlagents\trainers\learn.py”, line 12, in
from mlagents import tf_utils
File "c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\mlagents\tf_utils_init
.py", line 1, in
from mlagents.tf_utils.tf import tf as tf # noqa
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\mlagents\tf_utils\tf.py”, line 3, in
import tensorflow as tf # noqa I201
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow_init_.py”, line 41, in
from tensorflow.python.tools import module_util as module_util
File "c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python_init
.py", line 50, in
from tensorflow.python import pywrap_tensorflow
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 69, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
File “c:\users\administrator\appdata\local\programs\python\python36\lib\imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “c:\users\administrator\appdata\local\programs\python\python36\lib\imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

Failed to load the native TensorFlow runtime.

See بناء وتثبيت رسائل الخطأ  |  TensorFlow

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

So, I believe it’s due to AVX instruction not supported on the Server CPU

The server uses a set of Intel(R) Xeon(R) CPU X5650 @ 2.67GHz

Too bad, it would have freed up my main machine… dang it! :frowning:

Yeah, this seems like a Tensorflow problem - perhaps something on their Github issues might help?: GitHub - tensorflow/tensorflow: An Open Source Machine Learning Framework for Everyone

Its the AVX instruction… I think earlier versions were not compiled with AVX but newer ones are and i need 2.2.0 for MLAgents

ML-Agents is compatible with any TF >= 1.7, so if you want to use an older version you can do pip uninstall tensorflow and pip install tensorflow==<version>

I tried but it said it required 2.2.0… ??

1.5 was the last version complied without AVX… So it wont support.

If you really want to get it to work, there’s always compiling tensorflow from scratch - won’t be super straightforward, though.

thanks, i have a few machines around here. thanks for the details @ervteng_unity