0
votes

I'm new to using rasa and I encounter my first issue with it, when I try to run rasa init --no-prompt or rasa init I get the following error:

Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 193, in run_module_as_main "main", mod_spec) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "G:\rasa\venv\Scripts\rasa.exe_main.py", line 7, in
File "g:\rasa\venv\lib\site-packages\rasa_main
.py", line 82, in main set_log_level(log_level) File "g:\rasa\venv\lib\site-packages\rasa\utils\common.py", line 71, in set_log_level update_tensorflow_log_level() File "g:\rasa\venv\lib\site-packages\rasa\utils\common.py", line 112, in update_tensorflow_log_level import tensorflow as tf File "g:\rasa\venv\lib\site-packages\tensorflow_init_.py", line 101, in from tensorflow_core import * File "g:\rasa\venv\lib\site-packages\tensorflow_core_init_.py", line 40, in from tensorflow.python.tools import module_util as _module_util File "", line 983, in find_and_load
File "", line 959, in find_and_load_unlocked File "g:\rasa\venv\lib\site-packages\tensorflow_init.py", line 50, in getattr module = self.load() File "g:\rasa\venv\lib\site-packages\tensorflow_init.py", line 44, in load module = importlib.import_module(self.name) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\importlib_init.py", line 127, in import_module return bootstrap.gcd_import(name[level:], package, level) File "g:\rasa\venv\lib\site-packages\tensorflow_core\python_init.py", line 95, in from tensorflow.python import keras File "g:\rasa\venv\lib\site-packages\tensorflow_core\python\keras_init.py", line 27, in from tensorflow.python.keras import models File "g:\rasa\venv\lib\site-packages\tensorflow_core\python\keras_init.py", line 27, in from tensorflow.python.keras import models File "g:\rasa\venv\lib\site-packages\tensorflow_core\python\keras\models.py", line 26, in from tensorflow.python.keras.engine import sequential File "g:\rasa\venv\lib\site-packages\tensorflow_core\python\keras\engine\sequential.py", line 28, in from tensorflow.python.keras.engine import training File "g:\rasa\venv\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 46, in from tensorflow.python.keras.engine import training_arrays File "g:\rasa\venv\lib\site-packages\tensorflow_core\python\keras\engine\training_arrays.py", line 41, in from scipy.sparse import issparse # pylint: disable=g-import-not-at-top File "g:\rasa\venv\lib\site-packages\scipy_init
.py", line 136, in from . import distributor_init File "g:\rasa\venv\lib\site-packages\scipy_distributor_init.py", line 61, in WinDLL(os.path.abspath(filename)) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ctypes_init.py", line 364, in init self._handle = _dlopen(self._name, mode) OSError: [WinError 126] No se puede encontrar el módulo especificado

OS: Windows 10

Python version: 3.7

I have follow the instructions from the Rasa's website for the installation. https://rasa.com/docs/rasa/installation

I have installed Visual Studio 2019 and Visual Studio C++ Build tools

3

3 Answers

1
votes

The Module Not Found error may occur when you're using Windows or macOS for local development.

Modules are integral to the Python language. Modules let you break down your code into multiple files. This helps maintain the readability and maintainability of a codebase.It’s common to encounter a ModuleNotFoundError when working with modules.

you need a file named init.py (two underscores on each side) in every folder in the hierarchy, so one in src/ and one in model/. This is what python looks for to know that it should access a particular folder. The files are meant to contain initialization instructions but even if you create them empty this will solve it.

0
votes

I solved this a long time but forgot to answer my own question. I did try to reinstall python (different versions of it), I try to create virtual enviroments without luck. The thing that worked for me was installing anaconda and run the project within conda enviroment. I couldn't figured out what was the missing thing in a regular python setup.

0
votes

I had similar issue with rasa-x.

Try this:

pip install -U pip & rasa-x --extra-index-url https://pypi.rasa.com/simple --use-deprecated=legacy-resolver

Versions:

pip               :         21.1.2
Rasa Version      :         2.7.0
Minimum Compatible Version: 2.6.0
Rasa SDK Version  :         2.7.0
Rasa X Version    :         0.40.1
Python Version    :         3.8.9