Pip takes long time

even i m facing same issue please check @rctatman

3 Likes

It maybe a problem with the latest version of Rasa! I forced the installation to take rasa version 0.34.0 and it worked fine!

It looks like this is being caused by the latest version of pip. A temporary fix is to downgrade your pip version to 20.2:

pip install --upgrade pip==20.2

13 Likes

This helped for me, thanks for the tip @rctatman

Maybe this is incorrect but I noticed I have to downgrade the pip version in the respective virtual environment as well. So make sure the virtual environment with rasa is active and:

  1. pip install --upgrade pip==20.2
  2. run pip -V to make sure the right version is installed
  3. run pip install -U rasa-x --extra-index-url https://pypi.rasa.com/simple

Installation time was now quick and under a minute. Without performing these steps I had to wait over an hour and still no result.

5 Likes

It’s indeed because of the new resolver introduced in the 20.3 release of pip. You don’t need to downgrade your pip version until pip 21.0 is released (that’s when they want to get rid of the old dependency resolver). You can just use the old resolver via --use-deprecated=legacy-resolver like so:

pip install --use-deprecated=legacy-resolver --user rasa-x --extra-index-url https://pypi.rasa.com/simple

The reason for it takes so much time is the new backtracking feature of the new resolver paired with a not much constrained rasa-x dependencies. They could constrain their deps more to mitigate the issue, but pip probably will do something that fixes these very exaustive installation processes.

For more info on the issue, see:

5 Likes

When I use your solution I get an error message that the legacy-resolver is unknown. Downgrading pip also didn´t work for my Rasa X installation due to creating loads of conflicts. When I tried to solve one conflict another ten would pop up.

Update: I used a lower pip v.20 and python 3.6.10 in anaconda prompt where i created a virtual environment. Installation worked with few conflicts.

first down grade pip and install required packages with downgraded pip

This worked perfectly, thanks! My previous install had been running for 30 minutes and this completed in under 1 minute.

sorry, it has not worked for me i am using python 3.8 on mac-osx i am thinking of using dockerized rasa-x

@raveenb Hello, what you basically want to do or what is your end goal?

i want to share my trained model to my client for a POC. and take feedback from how the users are using the POC and improve the models

@raveenb please share rasa --version?

Hello,

After first trying pip3 install rasa-x --extra-index-url Simple Index I found it “took forever” and discovered this thread. The solutions so far have not worked.

Thanks @rctatman following your and ( also at-sign-mauricetk - it won’t let me mention two people!) I tried

  1. pip install --upgrade pip==20.2
  2. run pip -V to make sure the right version is installed
  3. run pip install -U rasa-x --extra-index-url https://pypi.rasa.com/simple

And I get the following error (see below)

I am on a 1 year old MacBookPro unix% uname -a Darwin SC7618.local 19.6.0 Darwin Kernel Version 19.6.0: Tue Aug 24 20:28:00 PDT 2021; root:xnu-6153.141.40~1/RELEASE_X86_64 x86_64

python --version Python 3.8.2

rasa --version Rasa Version : 2.8.7 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.2 Rasa X Version : None Python Version : 3.8.2 Operating System : macOS-10.15.7-x86_64-i386-64bit Python Path : /Users/tess/Code/env/bin/python

I am using an env that I have many other packages install. Is it worth trying to creating a fresh venv, putting rasa on their and then attempt yet again with rasa x?

Okay here is the error…

ERROR: Command errored out with exit status 1: /Users/tess/Code/env/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/private/var/folders/rp/15cln9kx2637tcwv_lcv7f6xhj58cs/T/pip-install-d6chms9q/ujson/setup.py’"’"’; file=’"’"’/private/var/folders/rp/15cln9kx2637tcwv_lcv7f6xhj58cs/T/pip-install-d6chms9q/ujson/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /private/var/folders/rp/15cln9kx2637tcwv_lcv7f6xhj58cs/T/pip-record-r8mh8t9g/install-record.txt --single-version-externally-managed --compile --install-headers /Users/tess/Code/env/include/site/python3.8/ujson Check the logs for full command output.

WARNING: You are using pip version 20.2; however, version 21.2.4 is available.

You should consider upgrading via the ‘/Users/tess/Code/env/bin/python -m pip install --upgrade pip’ command.

@mauricetk tagging you also RE my immediately previous post to see if you had any insight / suggestions.

Thank You So much

Thank you so much