简体   繁体   中英

Rasa init gives an error "Failed to load the native TensorFlow runtime"

I tried different versions of TF, installed VisualStudio but it never worked. I'm using Python 3.8.0rc1 on windows 10 64-bit. Would highly appreciate your help!

C:\WINDOWS\system32>rasa init
Traceback (most recent call last):
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 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\наталия\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Наталия\AppData\Local\Programs\Python\Python38\Scripts\rasa.exe\__main__.py", line 7, in <module>
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\rasa\__main__.py", line 104, in main
    set_log_level(log_level)
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\common.py", line 66, in set_log_level
    update_tensorflow_log_level()
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\common.py", line 108, in update_tensorflow_log_level
    import tensorflow as tf
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "c:\users\наталия\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: A dynamic link library (DLL) initialization routine failed.


Failed to load the native TensorFlow runtime.

First of all, I will suggest to use the Linux, ie Ubuntu Operating System through VM. Also which ever version you use for the Rasa or the VM or Python or Anaconda Environment, always opt for stable version.

Refer Rasa Change logs https://legacy-docs-v1.rasa.com/changelog/ also follow the Installation guide where the python versions are mentioned: https://legacy-docs-v1.rasa.com/user-guide/installation/

在此处输入图片说明

As you see 3.8 python version is not mentioned, so read the document and install as per the instruction, this could be a possibility for that error

Problem solved!

So after having read multiple issues similar to mine that other people had I figured that the main problem is my old Pentium CPU which doesn't support AVX instructions.

I tried older versions of tensorflow and rasa which didn't require AVX (tensorflow 1.15 and earlier, rasa 1.7.4 and earlier) but always received dependencies errors.

So I ended up upgrading my Pentium CPU for Core i-7 3770 and now it all works just fine in the latest versions available.

When I faced the similar error, I uninstalled Tensorflw completely, cleaned cache and then installed it again with Conda. Previously I had tensorflow installed using pip.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM