I have successfully install rasa but when I enter the train model option in conda it gives me this error at the end what thing I am missing?

Created project directory at ‘C:\Users\NineSol\Android_Mod_Bot’. Finished creating project structure. ? Do you want to train an initial model? :muscle:t4: Yes Training an initial model… Traceback (most recent call last): File “D:\Anaconda\envs\installingrasa\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec) File “D:\Anaconda\envs\installingrasa\lib\runpy.py”, line 85, in run_code exec(code, run_globals) File "D:\Anaconda\envs\installingrasa\Scripts\rasa.exe_main.py", line 7, in File "D:\Anaconda\envs\installingrasa\lib\site-packages\rasa_main.py", line 127, in main cmdline_arguments.func(cmdline_arguments) File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\cli\scaffold.py”, line 238, in run init_project(args, path) File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\cli\scaffold.py”, line 132, in init_project print_train_or_instructions(args) File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\cli\scaffold.py”, line 68, in print_train_or_instructions DEFAULT_MODELS_PATH, File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\api.py”, line 103, in train from rasa.model_training import train File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\model_training.py”, line 7, in import rasa.engine.validation File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\engine\validation.py”, line 20, in from rasa.core.policies.policy import PolicyPrediction File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\core\policies\policy.py”, line 26, in from rasa.core.featurizers.tracker_featurizers import TrackerFeaturizer File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\core\featurizers\tracker_featurizers.py”, line 24, in from rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\core\featurizers\single_state_featurizer.py”, line 7, in from rasa.nlu.extractors.extractor import EntityTagSpec File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\nlu\extractors\extractor.py”, line 30, in import rasa.utils.train_utils File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\utils\train_utils.py”, line 31, in from rasa.utils.tensorflow.callback import RasaTrainingLogger, RasaModelCheckpoint File “D:\Anaconda\envs\installingrasa\lib\site-packages\rasa\utils\tensorflow\callback.py”, line 13, in class RasaTrainingLogger(tf.keras.callbacks.Callback): AttributeError: module ‘tensorflow’ has no attribute ‘keras’

Hi @shahzaib This is not related to Rasa, This is most probably related to Tensorflow or Keras version. One of them may have glitchy issues.

Check for the Tensorflow version and check regarding the error. Some people have got this error in 2.11.0 version

Thanks for replying what is the prefered version for tensorflow?

the preferred version of TensorFlow for the latest version of Rasa (3.5.10) is TensorFlow 2.11.0, with TensorFlow Addons 0.19 and Tensorflow Text 2.11.0

You can find the required versions for all dependencies on the Rasa github under the pyproject.toml file. See line 89 [tool.poetry.dependencies]

(The link goes straight to the version 3.5.x branch, if you are on a different release of Rasa switch the branch to the appropriate version)

i have tried all but its not training the model at the end

@shahzaib can you share the rasa --version whilst activating the your conda env?


i am stuck installing rasa. Tried all possible solution over the internet.