Tuesday, March 30, 2021

Issues in RASA CLI installation in Conda Env using YML file (and workarounds) (less logs)



We do not have "rasa" available in "conda-forge" channel:

(erasa4) CMD>conda install rasa -c conda-forge
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - rasa

Current channels:

  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

-- -- -- -- --

ERRONEOUS CODE in FILE "env.yml"

name: erasa5
channels:
- conda-forge
dependencies:
- spacy
- python=3.8
- pip
- pip:
  - rasa
  - rasa-core

ERROR:

/ Pip subprocess error:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/joblib/
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'e:\\anaconda3\\envs\\erasa5\\scripts\\tqdm.exe'
Consider using the `--user` option or check the permissions.

failed

CondaEnvException: Pip failed

Complete Logs

(base) CMD>conda env create -f env.yml

Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: / Ran pip subprocess with arguments:
['e:\\Anaconda3\\envs\\erasa5\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\\Users\\ashish\\Desktop\\condaenv.170xtvti.requirements.txt']
Pip subprocess output:
...
Installing collected packages: sniffio, ..., rasa-core, rasa
  Attempting uninstall: attrs
    Found existing installation: attrs 20.3.0
    Uninstalling attrs-20.3.0:
      Successfully uninstalled attrs-20.3.0
  Attempting uninstall: multidict
    Found existing installation: multidict 5.1.0
    Uninstalling multidict-5.1.0:
      Successfully uninstalled multidict-5.1.0
  Attempting uninstall: pytz
    Found existing installation: pytz 2021.1
    Uninstalling pytz-2021.1:
      Successfully uninstalled pytz-2021.1
  Attempting uninstall: numpy
    Found existing installation: numpy 1.20.0
    Uninstalling numpy-1.20.0:
      Successfully uninstalled numpy-1.20.0
  Attempting uninstall: tqdm
    Found existing installation: tqdm 4.56.0
    Uninstalling tqdm-4.56.0:

Pip subprocess error:
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'e:\\anaconda3\\envs\\erasa5\\scripts\\tqdm.exe'
Consider using the `--user` option or check the permissions.

failed

CondaEnvException: Pip failed

(base) CMD>

-- -- -- -- -- 

We have a separate environment where we installed 'RASA_CORE' and 'RASA_NLU' separately, and here also we see that 'RASA' PYPI package (for RASA CLI) is failing to install.

ENV.YML for erasa4:

name: erasa4
channels:
- conda-forge
dependencies:
- spacy
- python=3.8
- pip
- pip:
  - rasa-core

(base) CMD>conda activate erasa4

Issues:
(erasa4) CMD>pip show rasa_core
Name: rasa-core
Version: 0.8.6
Summary: Machine learning based dialogue engine for conversational software.
Home-page: https://rasa.ai
Author: Rasa Technologies GmbH
Author-email: hi@rasa.ai
License: UNKNOWN
Location: e:\anaconda3\envs\erasa4\lib\site-packages
Requires: pandoc, ..., tqdm
Required-by:

(erasa4) CMD>pip show rasa_nlu
Name: rasa-nlu
Version: 0.11.5
Summary: Rasa NLU a natural language parser for bots
Home-page: https://rasa.com
Author: Alan Nichol
Author-email: alan@rasa.ai
License: UNKNOWN
Location: e:\anaconda3\envs\erasa4\lib\site-packages
Requires: future, numpy, simplejson, jsonschema, requests, cloudpickle, matplotlib, pathlib, klein, boto3, gevent, six, typing, tqdm
Required-by: rasa-core

(erasa4) CMD>pip show rasa
WARNING: Package(s) not found: rasa

-- -- -- -- -- 

ERROR

(erasa4) CMD>rasa
'rasa' is not recognized as an internal or external command, operable program or batch file.

(erasa4) CMD>rasa init
'rasa' is not recognized as an internal or external command, operable program or batch file.

RASA fails to install for all users.

(erasa4) CMD>pip3 install rasa

Collecting rasa
  Using cached rasa-2.2.9-py3-none-any.whl (689 kB)
...
Installing collected packages: sniffio, ..., rasa
  Attempting uninstall: multidict
    Found existing installation: multidict 5.1.0
    Uninstalling multidict-5.1.0:
      Successfully uninstalled multidict-5.1.0
  Attempting uninstall: yarl
    Found existing installation: yarl 1.6.3
    Uninstalling yarl-1.6.3:
      Successfully uninstalled yarl-1.6.3
  Attempting uninstall: numpy
    Found existing installation: numpy 1.19.5
    Uninstalling numpy-1.19.5:
      Successfully uninstalled numpy-1.19.5
  Attempting uninstall: attrs
    Found existing installation: attrs 20.3.0
    Uninstalling attrs-20.3.0:
      Successfully uninstalled attrs-20.3.0
  Attempting uninstall: absl-py
    Found existing installation: absl-py 0.11.0
    Uninstalling absl-py-0.11.0:
      Successfully uninstalled absl-py-0.11.0
  Attempting uninstall: tqdm
    Found existing installation: tqdm 4.56.0
    Uninstalling tqdm-4.56.0:
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'e:\\anaconda3\\envs\\erasa4\\scripts\\tqdm.exe'
Consider using the `--user` option or check the permissions.

(erasa4) CMD>

-- -- -- -- --

To install RASA CLI (and overcome the installation issue in "erasa4" environment) we have to open the terminal and run the "pip3 install rasa --user" command there:

(erasa4) CMD>pip3 install rasa --user
Collecting rasa
  Using cached rasa-2.2.9-py3-none-any.whl (689 kB)
...
Installing collected packages: tqdm, ..., rasa
  WARNING: The script tqdm.exe is installed in 'C:\Users\ashish\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script tabulate.exe is installed in 'C:\Users\ashish\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script coloredlogs.exe is installed in 'C:\Users\ashish\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts make_image_classifier.exe and make_nearest_neighbour_index.exe are installed in 'C:\Users\ashish\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts estimator_ckpt_converter.exe, saved_model_cli.exe, tensorboard.exe, tf_upgrade_v2.exe, tflite_convert.exe, toco.exe and toco_from_protos.exe are installed in 'C:\Users\ashish\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pykwalify.exe is installed in 'C:\Users\ashish\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script rasa.exe is installed in 'C:\Users\ashish\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
rasa-core 0.8.6 requires fbmessenger<5.0.0, but you have fbmessenger 6.0.0 which is incompatible.
rasa-core 0.8.6 requires pykwalify<=1.6.0, but you have pykwalify 1.7.0 which is incompatible.
Successfully installed PyJWT-2.0.1 SQLAlchemy-1.3.23 aio-pika-6.7.1 aiohttp-3.6.3 ... webexteamssdk-1.6

(erasa4) CMD> 

(erasa4) CMD>pip show rasa
Name: rasa
Version: 2.2.9
Summary: Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
Home-page: https://rasa.com
Author: Rasa Technologies GmbH
Author-email: hi@rasa.com
License: Apache-2.0
Location: c:\users\ashish\appdata\roaming\python\python38\site-packages
Requires: pykwalify, ..., tensorflow-probability
Required-by: 

-- -- -- -- --

(erasa4) CMD>rasa
2021-02-03 14:50:58.305729: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2021-02-03 14:50:58.313121: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
usage: rasa [-h] [--version] {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x} ...

Rasa command line interface. Rasa allows you to build your own conversational assistants 🤖. The 'rasa' command allows you to easily run most common commands like creating a new bot, training or evaluating models.

positional arguments:
  {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x}
                        Rasa commands
    init                Creates a new project, with example training data, actions, and config files.
    run                 Starts a Rasa server with your trained model.
    shell               Loads your trained model and lets you talk to your assistant on the command line.
    train               Trains a Rasa model using your NLU data and stories.
    interactive         Starts an interactive learning session to create new training data for a Rasa model by chatting.
    telemetry           Configuration of Rasa Open Source telemetry reporting.
    test                Tests Rasa models using your test NLU data and stories.
    visualize           Visualize stories.
    data                Utils for the Rasa training files.
    export              Export conversations using an event broker.

optional arguments:
  -h, --help            show this help message and exit
  --version             Print installed Rasa version

(erasa4) CMD>

-- -- -- -- --

ALSO, WE SHARE BELOW THE LOGS WHILE DOING INSTALLATION FROM TERMINAL WITHOUT USING YML FILE

(base) CMD>conda create -n temp_rasa python=3.8

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: e:\Anaconda3\envs\temp_rasa

  added / updated specs:
    - python=3.8

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2020.12.5          |   py38haa95532_0         141 KB
    pip-20.3.3                 |   py38haa95532_0         1.8 MB
    setuptools-52.0.0          |   py38haa95532_0         726 KB
    ------------------------------------------------------------
                                            Total:         2.6 MB

The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/win-64::ca-certificates-2021.1.19-haa95532_0
  certifi            pkgs/main/win-64::certifi-2020.12.5-py38haa95532_0
  openssl            pkgs/main/win-64::openssl-1.1.1i-h2bbff1b_0
  pip                pkgs/main/win-64::pip-20.3.3-py38haa95532_0
  python             pkgs/main/win-64::python-3.8.5-h5fd99cc_1
  setuptools         pkgs/main/win-64::setuptools-52.0.0-py38haa95532_0
  sqlite             pkgs/main/win-64::sqlite-3.33.0-h2a8f88b_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wheel              pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py38_0
  zlib               pkgs/main/win-64::zlib-1.2.11-h62dcd97_4

Proceed ([y]/n)? y

Downloading and Extracting Packages
certifi-2020.12.5    | 141 KB    | ### | 100%
setuptools-52.0.0    | 726 KB    | ### | 100%
pip-20.3.3           | 1.8 MB    | ### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate temp_rasa
#
# To deactivate an active environment, use
#
#     $ conda deactivate 

(temp_rasa) CMD>pip install rasa
Requirement already satisfied: rasa in c:\users\ashish\appdata\roaming\python\python38\site-packages (2.2.9)
...
Installing collected packages: sniffio, ..., apscheduler
Successfully installed PyYAML-5.4.1 absl-py-0.10.0 aiofiles-0.6.0 ... yarl-1.5.1

(temp_rasa) CMD>

(temp_rasa) CMD>pip show rasa
Name: rasa
Version: 2.2.9
Summary: Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
Home-page: https://rasa.com
Author: Rasa Technologies GmbH
Author-email: hi@rasa.com
License: Apache-2.0
Location: c:\users\ashish\appdata\roaming\python\python38\site-packages
Requires: sanic-cors, ..., colorhash
Required-by:

(temp_rasa) CMD>rasa

2021-02-03 15:19:23.023468: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2021-02-03 15:19:23.030147: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
usage: rasa [-h] [--version] {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x} ...

Rasa command line interface. Rasa allows you to build your own conversational assistants 🤖. The 'rasa' command allows you to easily run most common commands like creating a new bot, training or evaluating models.

positional arguments:
  {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x}
                        Rasa commands
    init                Creates a new project, with example training data, actions, and config files.
    run                 Starts a Rasa server with your trained model.
    shell               Loads your trained model and lets you talk to your assistant on the command line.
    train               Trains a Rasa model using your NLU data and stories.
    interactive         Starts an interactive learning session to create new training data for a Rasa model by chatting.
    telemetry           Configuration of Rasa Open Source telemetry reporting.
    test                Tests Rasa models using your test NLU data and stories.
    visualize           Visualize stories.
    data                Utils for the Rasa training files.
    export              Export conversations using an event broker.

optional arguments:
  -h, --help            show this help message and exit
  --version             Print installed Rasa version

(temp_rasa) CMD>

Title: Issues in RASA CLI installation in Conda Env using YML file (and workarounds) (less logs)

Tags: Technology,Python,

Original URL: https://survival8.blogspot.com/2021/02/issues-in-rasa-installation-in-conda.html
Original date: Wednesday, February 3, 2021

No comments:

Post a Comment