I am getting an error that seems to be common on the forum but found no solution in any of threads so I am starting my own.
I followed the Rasa installation guide until I reached the part to train an initial model (using rasa init), it only installs the data, actions, test, config, domain, endpoints files but runs into an error at the end and doesn’t include the models folder. The error is the following:
“AttributeError: module ‘tensorflow’ has no attribute ‘keras’”
Please note that I have already installed tensorflow, and I even installed keras separately and I still get this error. This is my rasa version:
Rasa Version : 3.5.3
Minimum Compatible Version: 3.5.0
Rasa SDK Version : 3.5.0
Python Version : 3.8.0
Operating System : Windows-10-10.0.19041-SP0
I have tried pip install tensorflow and conda install tensorflow and both end up with the same error and no solution.
Tried updating the tensorflow version but it is incompatible with rasa.
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
rasa 3.5.3 requires protobuf<3.20,>=3.9.2, but you have protobuf 4.22.1 which is incompatible.
rasa 3.5.3 requires tensorflow<2.12.0,>=2.11.0; sys_platform != “darwin” or platform_machine != “arm64”, but you have tensorflow 2.12.0 which is incompatible.
rasa 3.5.3 requires tensorflow-intel<2.12.0,>=2.11.0; sys_platform == “win32”, but you have tensorflow-intel 2.12.0 which is incompatible
Hey guys! I had the same problems now but I have the solution.
run:
pip install --upgrade tensorflow
it will download stuff but then will give you an error warning message that rasa 5.10 is using tensorflow x.y version and tensorflow-intel x.y version (cannot remember the exact version).
just pip install the version it tells you it is compatible with your rasa
this worked for me, but after i upgraded my venv’s python version to something 3.9.x or above to 3.10. Anything like 3.8 or 3.7 has a bug which won’t let u do this!