"rasa run ..." isn't using the proper Python version! [BUG?!?!?]

Ok this is interesting.

I have Anaconda configured with python 3.6.10 (this is necessary) and it’s been working well.

python --version
Python 3.6.10 :: Anaconda, Inc.

I can successfully run rasa shell and interact as expected.

however, when I run rasa run --enable-api -p 5005 I get some errors related to a custom connetor, BUT I see this at the top of the dump - unrelated to my connector

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/rasa/core/run.py", line 60, in _create_single_channel
    input_channel_class = rasa.utils.common.class_from_module_path(channel)
  File "/usr/local/lib/python3.7/site-packages/rasa/utils/common.py", line 198, in class_from_module_path
    m = importlib.import_module(module_name)
...

The important bit is the python3.7 in the path ?!?!?!

The resulting error has to do with the fact I do not have a specific package installed for 3.7, because Anaconda is using 3.6 and I would presume rasa is supposed to as well.

Any idea WHY kicking off rasa this way is forcing it to look in the 3.7 path? and if you know, is there a way to change to the proper path of 3.6.10 where my package exists?

if I exit my Anaconda enviromment, I do have a python3 specific command that runs 3.7, is the rasa run --enable-api -p 5005 triggering a python3 command?

**Update: this is exactly what is happening. For grins I popped out of Anaconda and ran pip3 install segments - reentered Anaconda and ran rasa run --enable-api -p 5005 and now I get a new missing module error. What’s going on??

1 Like

I think I figured it out.

I did not have rasa installed inside this particular anaconda environment. I had version 1.7.2 installed outside of Anaconda, so when I was running the rasa command, it was actually executing that version, which was then pulling from python3.

I entered Anaconda and ran pip install rasa However, the rasa run ... command was still executing the outside version.

In order to get the version inside my Anaconda environment to run, I had to exit Anaconda, and remove rasa

pip3 uninstall rasa

I entered my Anaconda environment and ran rasa --version and now see the current version