Hi, I want to follow the Rasa Masterclassd, which btw. is an excellent intiative. I unfortunately run into a trouble before i could even start the Masterclass. I followed the detailed installation guide and made a clean installation of homebrew, python and rasa assuming it installed all the latest versions. Installation seemed succesful. When I finally wanted to run ‘rasa init’ I encountered the “ModuleNotFoundError: No module named ‘rasa’” error. What a bummer! Just when the fun was supposed to start. Can anyone help here with trouble shooting? My current explanation is that I am running this on MacOs 10.12.6 which might perhaps not been supported anymore? Thanks for helping out a complete beginner to getting started !
Hi @okk, thanks for checking out our Masterclass! I am sure we can solve your issue
Do you use any virtual environment? It sounds a bit like you installed in one environment and try to run it in another. E.g. if you use Anaconda, you need to do conda activate yourEnvironment
where yourEnvironment
is the environment you installed rasa in.
Hi @j.mosig , thanks for the quick reply on what feels like such a noob question. I followed the detailed installation guide on the rasa website. here is what I did:
- install homebrew
- install python via homebrew
- create virtual environment via
python3 -m venv --system-site-packages ./venv
- activate the virtual environment
source ./venv/bin/activate
--> in terminal it changes to(venv) MacBook-Pro-2:~ dev$
- install rasa
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
-
(venv) MacBook-Pro-2:~ dev$ rasa init
then gave theModuleNotFound
error. It says in more detail:
File "/Users/dev/venv/bin/rasa", line 6, in <module>
from rasa.__main__ import main
ModuleNotFoundError: No module named 'rasa'
As mentioned before, I am on MacOs 10.12.6. and I noticed that the homebrew installer gave a warning: ==> You are using macOS 10.12. ==> We (and Apple) do not provide support for this old version.
Thanks for any pointers where I could start troubleshooting.
What is the output of pip show rasa
in that virtualenv?
The output is:
File "/Users/dev/venv/bin/pip", line 6, in <module>
from pip._internal.main import main
ModuleNotFoundError: No module named 'pip._internal.main'
It is perhaps some file path issue, but this is just an uneducated guess.
Seems to be an issue with pip. Does this help? https://github.com/pypa/pip/issues/5373#issuecomment-460214265
Hola, unfortunately I got the same problem. @okk have you already found a solution?
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
rasa init
Hi @StephanieHohenberg , thanks for the tip. I first thought that it might be an issue with my old MacOs, so I created a clean install of MacOS Mojave on another computer and followed the rasa installtion step by step, but I ended up with the same issue, so the installation guide on the rasa homepage definetely needs an update, at least for MacOS and especially for beginners. I downloaded pycharm and set up a project as you described and I get Rasa working. So thanks a lot for your help. I now can follow the Masterclass, which I think is in my case poorly named, I dont have any sense of mastery at this stage. best. oliver
Awesome @okk Always glad to help Happy coding
Just to clarify, I made a fresh install of the latest MacOS Mojave on a brand new hd and then followed the Rasa installation guide, step by step, I still run in the error as described above. Would be great if @Juste or someone else could have a look into the installation guide for MacOS on the Rasa home page. Would be nice if the installation would work out of the box without the need to install pycharm. @StephanieHohenberg do you have any idea how to achieve the same result without pycharm? I believe it must be possible as well with a simple command line?
I’m currently experiencing the same problem. I followed the installation steps exactly and have used virtual environments before yet when I try the init line I get the above error shown above:
File "/Users/dev/venv/bin/rasa", line 6, in <module>
from rasa.__main__ import main
ModuleNotFoundError: No module named 'rasa'
and when I do the ‘pip show rasa’ command I get no such error message, instead, I have a large description of the package and all of its dependencies and requirements. I’m lost for ideas on what is wrong and it doesn’t matter how many times I uninstall or reinstall anything I get the same errors.
hi, i used the workaround discovered by @StephanieHohenberg You need to install pycharme (the free version) , create a new project, set the location and the interpreter and then do the install from the terminal window in pycharme. see the forum post above with the screenshot for guidance.
Sorry, I just tried it with PyCharm. But I am sure there is a command to change the python version which is used in the virtual environment. Maybe this Stackoverflow post will help you: Use different Python version with virtualenv - Stack Overflow