# ImportError: DLL load failed with error code -1073741795

**URL:** <https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651>\
**Category:** Rasa Open Source\
**Created:** [July 29, 2019, 1:14am UTC](https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651 "2019-07-29T01:14:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shammy45](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shammy45/32/2869_2.png) [@shammy45](https://forum.rasa.com/u/shammy45)\
**Post date:** [July 29, 2019, 1:14am UTC](https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651/1 "2019-07-29T01:14:17Z")

</div>

When trying to run the following code (Python 3.7.3) in Anaconda, appears to be a TensorFlow package issue, any help to resolve is highly appreciated

```auto
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals

import logging

from rasa_core.agent import Agent
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy

if __name__ == ' __main__':
	logging.basicConfig(level='INFO')
	
	training_data_file = './data/stories.md'
	model_path = './models/dialogue'
	
	agent = Agent('weather_domain.yml', policies = [MemoizationPolicy(max_history=2), KerasPolicy(max_history=4)])
	data = agent.load_data(training_data_file)
	agent.train(data)

	agent.persist(model_path)

```

The below error pops up

```auto
ImportError: DLL load failed with error code -1073741795

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)
<ipython-input-1-df3dff1af747> in <module>
      5 import logging
      6 
----> 7 from rasa_core.agent import Agent
      8 from rasa_core.policies.keras_policy import KerasPolicy
      9 from rasa_core.policies.memoization import MemoizationPolicy

~\Anaconda3\lib\site-packages\rasa_core\ __init__.py in <module>
      4 
      5 from rasa_core.train import train
----> 6 from rasa_core.test import test
      7 from rasa_core.visualize import visualize
      8 

~\Anaconda3\lib\site-packages\rasa_core\test.py in <module>
     17 UserUttered)
     18 from rasa_core.interpreter import NaturalLanguageInterpreter
---> 19 from rasa_core.policies.form_policy import FormPolicy
     20 from rasa_core.trackers import DialogueStateTracker
     21 from rasa_core.training.generator import TrainingDataGenerator

~\Anaconda3\lib\site-packages\rasa_core\policies\ __init__.py in <module>
----> 1 from rasa_core.policies.policy import Policy
      2 from rasa_core.policies.ensemble import SimplePolicyEnsemble, PolicyEnsemble
      3 from rasa_core.policies.fallback import FallbackPolicy
      4 from rasa_core.policies.keras_policy import KerasPolicy
      5 from rasa_core.policies.memoization import (

~\Anaconda3\lib\site-packages\rasa_core\policies\policy.py in <module>
      1 import copy
      2 import logging
----> 3 import tensorflow as tf
      4 from typing import (
      5 Any, List, Optional, Text, Dict, Callable)

~\Anaconda3\lib\site-packages\tensorflow\ __init__.py in <module>
     26 
     27 # pylint: disable=g-bad-import-order
---> 28 from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
     29 from tensorflow.python.tools import module_util as _module_util
     30 

~\Anaconda3\lib\site-packages\tensorflow\python\ __init__.py in <module>
     47 import numpy as np
     48 
---> 49 from tensorflow.python import pywrap_tensorflow
     50 
     51 # Protocol buffers

~\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
     72 for some common reasons and solutions. Include the entire stack trace
     73 above this error message when asking for help.""" % traceback.format_exc()
---> 74 raise ImportError(msg)
     75 
     76 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long

ImportError: Traceback (most recent call last):
  File "C:\Users\CommonUse\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\CommonUse\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\CommonUse\Anaconda3\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\CommonUse\Anaconda3\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\CommonUse\Anaconda3\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed with error code -1073741795

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

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

```

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 29, 2019, 11:02am UTC](https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651/2 "2019-07-29T11:02:21Z")

</div>

Can you check out [this thread](https://stackoverflow.com/questions/49113497/python-tensorflow-import-dll-load-failed) and see if it helps?

---

<div class="post-metadata">

**Author:** ![shammy45](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shammy45/32/2869_2.png) [@shammy45](https://forum.rasa.com/u/shammy45)\
**Post date:** [July 29, 2019, 2:55pm UTC](https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651/3 "2019-07-29T14:55:36Z")

</div>

I tried but the wheel tensorflow-1.6.0-cp36-cp36m-win\_amd64.whl is for AMD processor, I get the following error message tensorflow-1.6.0-cp36-cp36m-win\_amd64.whl is not a supported wheel on this platform.

---

<div class="post-metadata">

**Author:** ![shammy45](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shammy45/32/2869_2.png) [@shammy45](https://forum.rasa.com/u/shammy45)\
**Post date:** [July 29, 2019, 4:06pm UTC](https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651/4 "2019-07-29T16:06:32Z")

</div>

Maybe a basic question, same code works fine in my Mac, but when trying to execute in a old laptop (Pentium Dual core, T4200) it errors out in TensorFlow package TF does this have anything to do with processor too?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 29, 2019, 6:43pm UTC](https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651/5 "2019-07-29T18:43:20Z")

</div>

Yeah it probably does have to do with the processor, we run into lots of tensorflow issues on windows/other platforms that never pop up on mac, you will probably have to dig to find a compatible tf wheel

---

<div class="post-metadata">

**Author:** ![shammy45](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shammy45/32/2869_2.png) [@shammy45](https://forum.rasa.com/u/shammy45)\
**Post date:** [August 2, 2019, 5:13pm UTC](https://forum.rasa.com/t/importerror-dll-load-failed-with-error-code-1073741795/13651/6 "2019-08-02T17:13:18Z")

</div>

Lets close this issue as its more to deal with hardware config
