Changing Python Versions


I’m having an issue in which I’m trying to get Rasa to pick up a different version of Python.

In my terminal window when I run the python command I can. see the correct version i.e. 3.8.12, however, when I run Rasa it shows up 3.7.12. I’m using Virtualenv to set the version of Python.

How can I fix this? Also is there some way to get Rasa to explicitly use a particular version or does it just get it from the environment variables?


Which version of Rasa are you running?

Sometimes, Rasa’s version is linked to compatible python versions. The latest Rasa 3.0 is compatible with Rasa 3.8.x

@qamir alright! In your, system Python Verison is 3.8.12 which is fine as you have checked on the terminal window using the command python --version, is that you have install Anconda Version?

@qamir When you created the Virtual Environment for Rasa installation the virtualenv picked the latest supported version of python i.e I guess 3.7.12 (I can be totally wrong on this) as when I created my virtualenv it’s 3.7.7 and system 3.6.8.

So, if you delete the virtualenv or update the virtualenv or try create the new virtaulenv may be it will pic the latest python version.

Reference for your 3.7.12 : venv — Creation of virtual environments — Python 3.7.12 documentation Reference for 3.8.12: venv — Creation of virtual environments — Python 3.8.12 documentation


Rasa 3.x is now only supported on the Python 3.7 and 3.8

Rasa 2.x is guess still support 3.6, 3.7 and 3.8 (Not sure again)

I hope this will help you to solve your issue.

Thanks for the replies!

When I run python --version I see 3.8.12 as expected. I ended up upgrading to Rasa 3.0 which fixed the issue.

As a summary of what happened:

I was on version Rasa 2.7.0 and while setting up another ML project unrelated to Rasa Tensorflow became updated which caused Rasa to throw this error when I ran my Rasa project:

[AttributeError: Can’t get attribute ‘FeatureArray’ on <module ‘rasa.utils.tensorflow.model_data’…

I didn’t have virtual environments set for both projects so paths and libraries got mixed up, I cleaned everything up and created virtual environments for both projects but the problem for Rasa remained & upgrading Rasa fixed it.


@qamir Yeah, this happens when we did not create the environment for our projects. Now everything is fine or are you still having some issuess?

@nik202 Yes all is good, thanks! My bad for not having my virtual environments set up in the first place, for deployment to production I’m using Docker so that part is isolated.

Thanks again for your help cc souvikg10.

@qamir No worries, can I request to please close this thread as a solution and good luck with your project.