Unable to install Rasa due to error

I am trying to install rasa on sagemaker. I created a new environment, installed the required dependencies. I also checked with pip install --upgrade setuptools --> Requirement already satisfied But when I tried pip3 install rasa, I got the error below

Collecting rasa
  Using cached rasa-1.10.2-py3-none-any.whl (510 kB)
Collecting networkx<2.5.0,>=2.4.0
  Using cached networkx-2.4-py3-none-any.whl (1.6 MB)
Collecting terminaltables<3.2.0,>=3.1.0
  Using cached terminaltables-3.1.10-py2.py3-none-any.whl (15 kB)
Collecting questionary<1.6.0,>=1.5.1
  Using cached questionary-1.5.2-py3-none-any.whl (26 kB)
Collecting tensorflow-probability<0.10,>=0.7
  Using cached tensorflow_probability-0.9.0-py2.py3-none-any.whl (3.2 MB)
Collecting redis<4.0,>=3.4
  Using cached redis-3.5.3-py2.py3-none-any.whl (72 kB)
Collecting cloudpickle<1.4,>=1.2
  Using cached cloudpickle-1.3.0-py2.py3-none-any.whl (26 kB)
Collecting absl-py<0.10,>=0.9
  Using cached absl-py-0.9.0.tar.gz (104 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-kvl3qhqg/absl-py_72f8c49a7af741b4b55d0694e6c3b916/setup.py", line 34, in <module>
          raise RuntimeError('Python version 2.7 or 3.4+ is required.')
      RuntimeError: Python version 2.7 or 3.4+ is required.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I restarted my kernel severally but still got the same error Kindly assist.

Please show me the output of pip3 -V.

If you see something other than Python 3.7 or 3.8, here’s your problem.

As mentioned in the docs, you need Python 3.7 or 3.8.

2 Likes
pip 22.0.4 from /home/studio-lab-user/.conda/envs/rasa_/lib/python3.10/site-packages/pip (python 3.10)

@Photons151 for installing rasa open source for 3.x you required

Install Rasa Open Source using pip (requires Python 3.7, or 3.8). Ref: Installation

Good Luck!

Is rasa is compatible with python version Python 3.11.5 As I’m trying to install it but it giving me the errer like this

 
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/03/5sbz8nsd2mb62p4v_jnx75b00000gn/T/pip-install-z9t8wtgh/absl-py_566ee63cd5cb4301ae7769a949a1aa44/setup.py", line 34, in <module>
          raise RuntimeError('Python version 2.7 or 3.4+ is required.')
      RuntimeError: Python version 2.7 or 3.4+ is required.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

I am seeing similar error during rasa installation.Pls help

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File “”, line 2, in File “”, line 34, in File “C:\Users\mchallapalli2\AppData\Local\Temp\pip-install-8ofdyzjf\absl-py_cc22db5e2a014be6b0ba4243a19904da\setup.py”, line 34, in raise RuntimeError(‘Python version 2.7 or 3.4+ is required.’) RuntimeError: Python version 2.7 or 3.4+ is required. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

(venv) C:\GitHub\xx\Chatbot->python --version Python 3.11.6

download python 3.9 from official python website

open command prompt and run the below:

python --version (confirm its 3.9, otherwise uninstall previous versions and install 3.9)

next run, one after the other

python -m venv venv

.\venv\Scripts\activate

pip install --upgrade setuptools

pip install --upgrade pip

pip install --upgrade wheel

pip install rasa (wait till its done)

(if you get execution policy error) Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

rasa init

remember, fight it until it works , good luck