python-3.xtensorflowtensorflow2.0rasarasa-x

Face many issues to rasa initialization rasa init --no-prompt


I knew, its duplicate question, but I can't find the way to solve my issue. I tried, tensorflow all versions.

Python 3.6.8 tensorflow = 1.15.0 Windows 10 Faced VC++ error, I installed VC++ 14

I tried via using condo, still facing the tensorflow issue. I face the issue like, its created the project structure, but tensorflow.python.framework.errors


To get started quickly, an initial project will be created.
If you need some help, check out the documentation at https://rasa.com/docs/rasa.

Created project directory at 'C:\Users\Administrator\AppData\Local\Programs\Python\Python36\Scripts\venv\Scripts'.
Finished creating project structure.
Training an initial model...
Training Core model...
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\Scripts\venv\Scripts\rasa.exe\__main__.py", line 7, in <module>
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\__main__.py", line 92, in main
    cmdline_arguments.func(cmdline_arguments)
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\cli\scaffold.py", line 206, in run
    init_project(args, path)
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\cli\scaffold.py", line 118, in init_project
    print_train_or_instructions(args, path)
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\cli\scaffold.py", line 58, in print_train_or_instructions
    args.model = rasa.train(domain, config, training_files, output)
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\train.py", line 50, in train
    additional_arguments=additional_arguments,
  File "C:\ProgramData\Anaconda3\lib\asyncio\base_events.py", line 583, in run_until_complete
    return future.result()
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\train.py", line 101, in train_async
    additional_arguments,
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\train.py", line 188, in _train_async_internal
    additional_arguments=additional_arguments,
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\train.py", line 223, in _do_training
    additional_arguments=additional_arguments,
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\train.py", line 361, in _train_core_with_validated_data
    additional_arguments=additional_arguments,
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\core\train.py", line 43, in train
    policies = config.load(policy_config)
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\core\config.py", line 28, in load
    return PolicyEnsemble.from_dict(config_data)
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\core\policies\ensemble.py", line 308, in from_dict
    constr_func = registry.policy_from_module_path(policy_name)
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\core\registry.py", line 21, in policy_from_module_path
    module_path, lookup_path="rasa.core.policies.registry"
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\utils\common.py", line 220, in class_from_module_path
    m = importlib.import_module(lookup_path)
  File "C:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\core\policies\registry.py", line 5, in <module>
    from rasa.core.policies.ted_policy import TEDPolicy
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\rasa\core\policies\ted_policy.py", line 8, in <module>
    import tensorflow_addons as tfa
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\tensorflow_addons\__init__.py", line 21, in <module>
    from tensorflow_addons import activations
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\tensorflow_addons\activations\__init__.py", line 21, in <module>
    from tensorflow_addons.activations.gelu import gelu
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\tensorflow_addons\activations\gelu.py", line 24, in <module>
    get_path_to_datafile("custom_ops/activations/_activation_ops.so"))
  File "c:\users\administrator\appdata\local\programs\python\python36\scripts\venv\lib\site-packages\tensorflow_core\python\framework\load_library.py", line 61, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid name: Addons>Gelu (Did you use CamelCase?); in OpDef: name: "Addons>Gelu" input_arg { name: "features" type_attr: "T" } output_arg { name: "activations" type_attr: "T" } attr { name: "T" type: "type" allowed_values { list { type: DT_HALF type: DT_FLOAT type: DT_DOUBLE } } } attr { name: "approximate" type: "bool" default_value { b: true } }```

Solution

  • rasa>=1.8 supports tensorflow 2 and tensorflow-text. However, tensorflow-text is not supported on Windows, which it looks like you're developing on. You can still use Rasa, but some pipelines will not be supported. I'd recommend this video tutorial for installing Rasa on Windows: https://www.youtube.com/watch?v=4ewIABo0OkU&t=1s