I am using anaconda prompt. I want to run rasa. I have installed successfully keras in system as well as in virtual environments too, using command **conda install keras** .
But when I run the command **rasa init** then in NLU traing It gives me an error for ModuleNotFound: keras. What should I do resolve this error and successfully run the rasa chatbot?
I have checked that keras2.4.3 is installed in both my system and virtual environment using command **conda list**.
My Rasa version is Rasa Version : 2.8.12 Minimum Compatible Version: 2.8.9 Rasa SDK Version : 2.8.2 Rasa X Version : None Python Version : 3.8.3 Operating System : Windows-10-10.0.19041-SP0 Python Path : C:\Python39\python.exe
Error I am getting when running **rasa init** command:
Welcome to Rasa! 🤖
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.
Now let's start! 👇🏽
? Please enter a path where the project will be created [default: current directory] .
? Directory 'C:\Users\om sai infotech\OneDrive\Desktop\organization_BOT(complete_dynamic)\organization_BOT\bot' is not empty. Continue? Yes
Created project directory at 'C:\Users\om sai infotech\OneDrive\Desktop\organization_BOT(complete_dynamic)\organization_BOT\bot'.
Finished creating project structure.
? Do you want to train an initial model? 💪🏽 Yes
Training an initial model...
The configuration for pipeline and policies was chosen automatically. It was written into the config file at '.\config.yml'.
2021-11-10 18:58:11 INFO rasa.model - Data (domain) for Core model section changed.
2021-11-10 18:58:11 INFO rasa.model - Data (messages) for NLU model section changed.
2021-11-10 18:58:11 INFO rasa.model strong text- Data (nlg) for NLG responses section changed.
Training NLU model...
Traceback (most recent call last):
File "C:\Python39\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\rasa.exe\__main__.py", line 7, in <module>
File "C:\Python39\lib\site-packages\rasa\__main__.py", line 118, in main
cmdline_arguments.func(cmdline_arguments)
File "C:\Python39\lib\site-packages\rasa\cli\scaffold.py", line 235, in run
init_project(args, path)
File "C:\Python39\lib\site-packages\rasa\cli\scaffold.py", line 130, in init_project
print_train_or_instructions(args, path)
File "C:\Python39\lib\site-packages\rasa\cli\scaffold.py", line 69, in print_train_or_instructions
training_result = rasa.train(domain, config, training_files, output)
File "C:\Python39\lib\site-packages\rasa\api.py", line 109, in train
return rasa.utils.common.run_in_loop(
File "C:\Python39\lib\site-packages\rasa\utils\common.py", line 296, in run_in_loop
result = loop.run_until_complete(f)
File "C:\Python39\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "C:\Python39\lib\site-packages\rasa\model_training.py", line 108, in train_async
return await _train_async_internal(
File "C:\Python39\lib\site-packages\rasa\model_training.py", line 288, in _train_async_internal
await _do_training(
File "C:\Python39\lib\site-packages\rasa\model_training.py", line 334, in _do_training
model_path = await _train_nlu_with_validated_data(
File "C:\Python39\lib\site-packages\rasa\model_training.py", line 758, in _train_nlu_with_validated_data
await rasa.nlu.train.train(
File "C:\Python39\lib\site-packages\rasa\nlu\train.py", line 96, in train
trainer = Trainer(
File "C:\Python39\lib\site-packages\rasa\nlu\model.py", line 164, in __init__
components.validate_requirements(cfg.component_names)
File "C:\Python39\lib\site-packages\rasa\nlu\components.py", line 58, in validate_requirements
from rasa.nlu import registry
File "C:\Python39\lib\site-packages\rasa\nlu\registry.py", line 12, in <module>
from rasa.nlu.classifiers.diet_classifier import DIETClassifier
File "C:\Python39\lib\site-packages\rasa\nlu\classifiers\diet_classifier.py", line 24, in <module>
from rasa.utils.tensorflow.models import RasaModel, TransformerRasaModel
File "C:\Python39\lib\site-packages\rasa\utils\tensorflow\models.py", line 47, in <module>
from rasa.utils.tensorflow.temp_keras_modules import TmpKerasModel
File "C:\Python39\lib\site-packages\rasa\utils\tensorflow\temp_keras_modules.py", line 16, in <module>
from keras.callbacks import Callback, History
ModuleNotFoundError: No module named 'keras'
I donot know why its coming because keras is successfully installed in my system and also running. Please do help me as soon as possible I shall be highly thankful to you.