question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'randomname'

See original GitHub issue

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'

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ShabbirK52commented, Feb 5, 2022

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.

0reactions
ShabbirK52commented, Feb 8, 2022

Wow, this blows my mind. I’m glad you got it to work @ShabbirK52!

Thank you for patiently helping me out, much appreciated 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'randomname' · ...
This should be easily fixed by pip install randomname . It's already installed. `(venv) (base) PS D:\cacow> pip install randomname Requirement ...
Read more >
No module named 'random-name-generator'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'random-name-generator' How to remove.
Read more >
randomname
Generate random adj-noun names like docker and github.
Read more >
Error was: No module named Random - python
If the error is exactly "No module named Random", then you've written import Random when you really meant import random . There is...
Read more >
🤔 How to fix "ModuleNotFoundError: No module named ' ...
How to fix "ModuleNotFoundError: No module named 'random-name-generator'" ... You must first install the package before you can use it in your code....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found