rasa: ModuleNotFoundError: No module named 'randomname'

Rasa Open Source version

3.0.6

Rasa SDK version

No response

Rasa X version

No response

Python version

3.8

What operating system are you using?

Windows

What happened?

i used conda to create a virtual env for which i used the command: conda create --name rasa_project python==3.8 ujson tensorflow==2.6

after that i activated the env and installed rasa using: python -m pip install rasa

when i use rasa init to initialize the project, i get the following error.

Command / Request

rasa init

Relevant log output

(rasa_project) F:\pc\BEPROJECT>rasa init
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 'F:\pc\BEPROJECT' is not empty. Continue? Yes
Created project directory at 'F:\pc\BEPROJECT'.
Finished creating project structure.
? Do you want to train an initial model? 💪🏽 Yes
Training an initial model...
Traceback (most recent call last):
File "F:\pc\miniconda3\envs\rasa_project\lib\runpy.py", line 192, in _run_module_as_main
return run_code(code, main_globals, None,
File "F:\pc\miniconda3\envs\rasa_project\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "F:\pc\miniconda3\envs\rasa_project\Scripts\rasa.exe_main.py", line 7, in
File "F:\pc\miniconda3\envs\rasa_project\lib\site-packages\rasa_main.py", line 121, in main
cmdline_arguments.func(cmdline_arguments)
File "F:\pc\miniconda3\envs\rasa_project\lib\site-packages\rasa\cli\scaffold.py", line 238, in run
init_project(args, path)
File "F:\pc\miniconda3\envs\rasa_project\lib\site-packages\rasa\cli\scaffold.py", line 132, in init_project
print_train_or_instructions(args)
File "F:\pc\miniconda3\envs\rasa_project\lib\site-packages\rasa\cli\scaffold.py", line 64, in print_train_or_instructions
training_result = rasa.train(
File "F:\pc\miniconda3\envs\rasa_project\lib\site-packages\rasa\api.py", line 103, in train
from rasa.model_training import train
File "F:\pc\miniconda3\envs\rasa_project\lib\site-packages\rasa\model_training.py", line 6, in
import randomname
ModuleNotFoundError: No module named 'randomname'

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

for python 3.7, i used python -m pip install --upgrade numpy which changed numpy version to one which isn’t supported by rasa so i uninstalled it again using python -m pip uninstall numpy and then reinstalled it using python -m pip install numpy==1.19.2 but my error wasn’t resolved. i didn’t install numpy as a separate dependency and allowed rasa to install all dependencies itself by python -m pip install rasa so i don’t understand why i am getting that error in the first place.

Sounds like a similar error to randomname 🤔 If you run python -c 'import numpy; print(numpy.__version__)' does it show you version 1.19.2 that have been installed? What’s the exact error message saying?

I tweaked my env a lot and finally found a way through. I created a fresh env with python 3.9 then installed randomname and checked if python was able to recognize it. Once that was successful, I then downgraded python to 3.8 and rechecked if it could recognize randomname. It worked. After that i installed rasa using python -m pip install rasa and everything works like a charm so far.