Showing posts with label Anaconda. Show all posts
Showing posts with label Anaconda. Show all posts

Sunday, May 23, 2021

Python (2) String and related packages [20210523]

We would begin with a line about Python String from the book "Pg 191, Learning Python (O'Reilly, 5e)":
  
Strictly speaking, Python strings are categorized as immutable sequences, meaning that the characters they contain have a left-to-right positional order and that they cannot be changed in place. In fact, strings are the first representative of the larger class of objects called sequences that we will study here. Pay special attention to the sequence operations introduced in this post, because they will work the same on other sequence types we’ll explore later, such as lists and tuples.
  
Table 7-1. Common string literals and operations

Operation Interpretation
S = '' Empty string
S = "spam's" Double quotes, same as single
S = 's\np\ta\x00m' Escape sequences
S = """...multiline...""" Triple-quoted block strings
S = r'\temp\spam' Raw strings (no escapes)
print(S) # \temp\spam
B = b'sp\xc4m' Byte strings in 2.6, 2.7, and 3.X
print(B) # b'sp\xc4m'
U = u'sp\u00c4m' Unicode strings in 2.X and 3.3+
print(U) # spÄm
S1 + S2 Concatenate
S * 3 repeat
S[i] Index
S[i:j] slice
len(S) length
"a %s parrot" % 'kind' String formatting expression
print("a %s parrot" % 'kind') # a kind parrot
"a {0} parrot".format('kind') String formatting method in 2.6, 2.7, and 3.X
S.find('pa') String methods (see ahead for all 43): search
print('a parrot'.find('pa')) # 2
S.rstrip() remove whitespace from end
print("!" + " okay ".rstrip() + "!") # ! okay!
S.strip() remove whitespace from beginning and end
print("!" + " okay ".strip() + "!") # !okay!
S.replace('pa', 'xx') replacement
print("parrot".replace('pa', 'xx')) # xxrrot
S.split(',') split on delimiter
S.isdigit() content test
S.lower()
S.upper()
case conversion
print("Parrot".lower()) # parrot
print("parrot".upper()) # PARROT
S.endswith('spam') end test
print("is this yours".endswith("yours")) # True
print("my parrot".startswith("my")) # True
'spam'.join(strlist) delimiter join
S.encode('latin-1') Unicode encoding
B.decode('utf8') Unicode decoding, etc.
for x in S: print(x) Iteration
'spam' in S membership
[c * 2 for c in S] list comprehension to create a new list
map(ord, S) map(ord, "hello") # [104, 101, 108, 108, 111]
map(lambda x: 10*x, [1,2,3,4]) # [10, 20, 30, 40]
re.match('sp(.*)am', line) Pattern matching: library module
To begin our work, we would first create a Conda environment for this using a YAML file as shown below: Filename: string_env.yml Note: "name: string_env" This line is where we are suggesting the name for our new environment below. name: string_env channels: - conda-forge dependencies: - python=3.9 - pip - nltk - spacy - scikit-learn - pandas - ipykernel - jupyter - jupyterlab #-#-#-#-#-#-#-#-#-# (base) CMD>conda env create -f string_env.yml Collecting package metadata (repodata.json): done Solving environment: / Warning: 2 possible package resolutions (only showing differing packages): - conda-forge/noarch::typer-0.3.1-py_0, conda-forge/win-64::click-8.0.0-py39hcbf5309_0 - conda-forge/noarch::click-7.1.2-pyh9f0ad1d_0, conda-forge/noarch::typer-0.3.2-pyhd8ed1abdone Downloading and Extracting Packages chardet-4.0.0 | 218 KB | # | 100% pyqtchart-5.12 | 207 KB | # | 100% parso-0.8.2 | 68 KB | # | 100% vc-14.2 | 13 KB | # | 100% jinja2-3.0.0 | 98 KB | # | 100% markupsafe-2.0.0 | 25 KB | # | 100% jupyter_server-1.7.0 | 441 KB | # | 100% threadpoolctl-2.1.0 | 15 KB | # | 100% pywinpty-1.1.0 | 179 KB | # | 100% urllib3-1.26.4 | 99 KB | # | 100% pywin32-300 | 6.9 MB | # | 100% zipp-3.4.1 | 11 KB | # | 100% pandas-1.2.4 | 10.2 MB | # | 100% attrs-21.2.0 | 44 KB | # | 100% tzdata-2021a | 121 KB | # | 100% grpcio-1.37.1 | 2.0 MB | # | 100% pygments-2.9.0 | 754 KB | # | 100% six-1.16.0 | 14 KB | # | 100% dataclasses-0.8 | 7 KB | # | 100% mkl-2021.2.0 | 183.8 MB | # | 100% googleapis-common-pr | 128 KB | # | 100% rsa-4.7.2 | 28 KB | # | 100% google-cloud-storage | 71 KB | # | 100% mistune-0.8.4 | 54 KB | # | 100% cryptography-3.4.7 | 706 KB | # | 100% typing-extensions-3. | 8 KB | # | 100% qtconsole-5.1.0 | 89 KB | # | 100% pyqt-5.12.3 | 22 KB | # | 100% boto3-1.17.74 | 70 KB | # | 100% libclang-11.1.0 | 20.8 MB | # | 100% qt-5.12.9 | 106.1 MB | # | 100% google-crc32c-1.1.2 | 26 KB | # | 100% cymem-2.0.5 | 40 KB | # | 100% aiohttp-3.7.4 | 600 KB | # | 100% preshed-3.0.5 | 96 KB | # | 100% wasabi-0.8.2 | 23 KB | # | 100% pyqtwebengine-5.12.1 | 143 KB | # | 100% pyzmq-22.0.3 | 703 KB | # | 100% pickleshare-0.7.5 | 9 KB | # | 100% pandoc-2.13 | 16.3 MB | # | 100% typing_extensions-3. | 25 KB | # | 100% spacy-3.0.6 | 9.1 MB | # | 100% spacy-legacy-3.0.5 | 14 KB | # | 100% terminado-0.9.4 | 26 KB | # | 100% protobuf-3.17.0 | 262 KB | # | 100% backports.functools_ | 9 KB | # | 100% google-auth-1.30.0 | 77 KB | # | 100% liblapack-3.9.0 | 4.0 MB | # | 100% zlib-1.2.11 | 126 KB | # | 100% joblib-1.0.1 | 206 KB | # | 100% decorator-5.0.9 | 11 KB | # | 100% zeromq-4.3.4 | 9.0 MB | # | 100% pysocks-1.7.1 | 28 KB | # | 100% ipywidgets-7.6.3 | 101 KB | # | 100% prompt-toolkit-3.0.1 | 244 KB | # | 100% cachetools-4.2.2 | 12 KB | # | 100% jupyterlab_widgets-1 | 130 KB | # | 100% pip-21.1.1 | 1.1 MB | # | 100% scikit-learn-0.24.2 | 6.6 MB | # | 100% defusedxml-0.7.1 | 23 KB | # | 100% sqlite-3.35.5 | 1.2 MB | # | 100% numpy-1.20.2 | 5.3 MB | # | 100% testpath-0.5.0 | 86 KB | # | 100% win_inet_pton-1.1.0 | 8 KB | # | 100% m2w64-gcc-libs-5.3.0 | 520 KB | # | 100% click-8.0.0 | 146 KB | # | 100% jsonschema-3.2.0 | 45 KB | # | 100% libprotobuf-3.17.0 | 2.3 MB | # | 100% vs2015_runtime-14.28 | 2.3 MB | # | 100% jpeg-9d | 366 KB | # | 100% babel-2.9.1 | 6.2 MB | # | 100% ipython-7.23.1 | 1.1 MB | # | 100% wcwidth-0.2.5 | 33 KB | # | 100% tornado-6.1 | 654 KB | # | 100% prompt_toolkit-3.0.1 | 4 KB | # | 100% pydantic-1.7.3 | 164 KB | # | 100% brotlipy-0.7.0 | 369 KB | # | 100% bz2file-0.98 | 9 KB | # | 100% jupyter-1.0.0 | 6 KB | # | 100% importlib-metadata-4 | 30 KB | # | 100% widgetsnbextension-3 | 1.8 MB | # | 100% argon2-cffi-20.1.0 | 51 KB | # | 100% bleach-3.3.0 | 111 KB | # | 100% jupyter_console-6.4. | 22 KB | # | 100% nbclient-0.5.3 | 67 KB | # | 100% srsly-2.4.1 | 501 KB | # | 100% async-timeout-3.0.1 | 11 KB | # | 100% pyopenssl-20.0.1 | 48 KB | # | 100% json5-0.9.5 | 20 KB | # | 100% google-resumable-med | 40 KB | # | 100% nbconvert-6.0.7 | 563 KB | # | 100% jupyter_client-6.1.1 | 79 KB | # | 100% matplotlib-inline-0. | 11 KB | # | 100% backports-1.0 | 4 KB | # | 100% pyqt5-sip-4.19.18 | 298 KB | # | 100% pathy-0.5.2 | 37 KB | # | 100% wheel-0.36.2 | 31 KB | # | 100% tbb-2021.2.0 | 138 KB | # | 100% m2w64-libwinpthread- | 31 KB | # | 100% qtpy-1.9.0 | 34 KB | # | 100% entrypoints-0.3 | 8 KB | # | 100% nbformat-5.1.3 | 47 KB | # | 100% boto-2.49.0 | 838 KB | # | 100% jupyter_core-4.7.1 | 96 KB | # | 100% pyqt-impl-5.12.3 | 4.3 MB | # | 100% nltk-3.6.2 | 1.1 MB | # | 100% libblas-3.9.0 | 4.0 MB | # | 100% anyio-3.0.1 | 133 KB | # | 100% cffi-1.14.5 | 228 KB | # | 100% typer-0.3.1 | 22 KB | # | 100% botocore-1.20.74 | 4.6 MB | # | 100% icu-68.1 | 16.3 MB | # | 100% regex-2021.4.4 | 334 KB | # | 100% python-3.9.4 | 19.9 MB | # | 100% libpng-1.6.37 | 724 KB | # | 100% websocket-client-0.5 | 62 KB | # | 100% yarl-1.5.1 | 136 KB | # | 100% requests-2.25.1 | 51 KB | # | 100% msys2-conda-epoch-20 | 3 KB | # | 100% colorama-0.4.4 | 18 KB | # | 100% jedi-0.18.0 | 931 KB | # | 100% setuptools-49.6.0 | 954 KB | # | 100% jupyterlab_server-2. | 40 KB | # | 100% libcblas-3.9.0 | 4.0 MB | # | 100% wincertstore-0.2 | 15 KB | # | 100% smart_open-2.2.1 | 78 KB | # | 100% python-dateutil-2.8. | 220 KB | # | 100% google-api-core-1.26 | 59 KB | # | 100% tqdm-4.60.0 | 79 KB | # | 100% nest-asyncio-1.5.1 | 9 KB | # | 100% thinc-8.0.3 | 926 KB | # | 100% prometheus_client-0. | 46 KB | # | 100% notebook-6.4.0 | 6.1 MB | # | 100% murmurhash-1.0.5 | 26 KB | # | 100% nbclassic-0.2.8 | 17 KB | # | 100% pyrsistent-0.17.3 | 92 KB | # | 100% libsodium-1.0.18 | 697 KB | # | 100% scipy-1.6.3 | 23.3 MB | # | 100% m2w64-gcc-libgfortra | 342 KB | # | 100% catalogue-2.0.4 | 31 KB | # | 100% sniffio-1.2.0 | 16 KB | # | 100% shellingham-1.4.0 | 11 KB | # | 100% cython-blis-0.7.4 | 5.6 MB | # | 100% s3transfer-0.4.2 | 55 KB | # | 100% certifi-2020.12.5 | 144 KB | # | 100% python_abi-3.9 | 4 KB | # | 100% m2w64-gcc-libs-core- | 214 KB | # | 100% ipykernel-5.5.5 | 168 KB | # | 100% traitlets-5.0.5 | 81 KB | # | 100% libcrc32c-1.1.1 | 25 KB | # | 100% packaging-20.9 | 35 KB | # | 100% multidict-5.1.0 | 63 KB | # | 100% jupyterlab-3.0.15 | 5.5 MB | # | 100% m2w64-gmp-6.1.0 | 726 KB | # | 100% google-cloud-core-1. | 26 KB | # | 100% Preparing transaction: done Verifying transaction: done Executing transaction: / Enabling notebook extension jupyter-js-widgets/extension... - Validating: ok done # # To activate this environment, use # $ conda activate string_env # To deactivate an active environment, use # $ conda deactivate #-#-#-#-#-#-#-#-#-# Suppose we are coming back after a week to work and we need to work in an environment again. What do we do now if don't remember the name? (base) CMD>conda env list # conda environments: # base * E:\programfiles\Anaconda3 pegasus E:\programfiles\Anaconda3\envs\pegasus py39 E:\programfiles\Anaconda3\envs\py39 selenium E:\programfiles\Anaconda3\envs\selenium string_env E:\programfiles\Anaconda3\envs\string_env tf E:\programfiles\Anaconda3\envs\tf #-#-#-#-#-#-#-#-#-# (base) ~\Desktop\ws>conda activate string_env (string_env) ~\Desktop\ws>jupyter lab [I 2021-05-19 02:43:28.973 ServerApp] jupyterlab | extension was successfully linked. [I 2021-05-19 02:43:29.051 ServerApp] Writing notebook server cookie secret to C:\Users\Ashish Jain\AppData\Roaming\jupyter\runtime\jupyter_cookie_secret [W 2021-05-19 02:43:29.145 ServerApp] The 'min_open_files_limit' trait of a ServerApp instance expected an int, not the NoneType None. [I 2021-05-19 02:43:29.191 LabApp] JupyterLab extension loaded from E:\programfiles\Anaconda3\envs\string_env\lib\site-packages\jupyterlab [I 2021-05-19 02:43:29.191 LabApp] JupyterLab application directory is E:\programfiles\Anaconda3\envs\string_env\share\jupyter\lab [I 2021-05-19 02:43:29.207 ServerApp] jupyterlab | extension was successfully loaded. [I 2021-05-19 02:43:29.801 ServerApp] nbclassic | extension was successfully loaded. [I 2021-05-19 02:43:30.176 ServerApp] Serving notebooks from local directory: ~\Desktop\ws [I 2021-05-19 02:43:30.176 ServerApp] Jupyter Server 1.7.0 is running at: [I 2021-05-19 02:43:30.176 ServerApp] http://localhost:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 [I 2021-05-19 02:43:30.176 ServerApp] http://127.0.0.1:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 [I 2021-05-19 02:43:30.176 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 2021-05-19 02:43:30.332 ServerApp] To access the server, open this file in a browser: file:///C:/Users/Ashish%20Jain/AppData/Roaming/jupyter/runtime/jpserver-1812-open.html Or copy and paste one of these URLs: http://localhost:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 http://127.0.0.1:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 #-#-#-#-#-#-#-#-#-# Ques: What is the difference between "Jupyter Notebook" and "Jupyter Lab"? Ans: Jupyter Notebook is a web-based interactive computational environment for creating Jupyter notebook documents. It supports several languages like Python (IPython), Julia, R etc. and is largely used for data analysis, data visualization and further interactive, exploratory computing. JupyterLab is the next-generation user interface including notebooks. It has a modular structure, where you can open several notebooks or files (e.g. HTML, Text, Markdowns etc) as tabs in the same window. It offers more of an IDE-like experience. For a beginner I would suggest starting with Jupyter Notebook as it just consists of a filebrowser and an (notebook) editor view. It might be easier to use. If you want more features, switch to JupyterLab. JupyterLab offers much more features and an enhanced interface, which can be extended through extensions: JupyterLab Extensions (GitHub) #-#-#-#-#-#-#-#-#-#

Now Some Hands-On

# Picking the fifth character from a string str_1 = "Hi, I am Ashish!" str_1[4] 'I' # Picking characters from fifth to tenth str_1[4:10] 'I am A' # Print the length of the string print(len(str_1)) print(len(str_1[4:10])) 16 6 # Print every second character in the string str_1[0::2] 'H,Ia sih' # When you give negative number for indexing, it starts traversing the string from the right: print(str_1[-1]) print(str_1[-2]) print(str_1[-5 : -1]) print(str_1[-5 :]) ! h hish hish! When you are giving a range for indexing to a string, the first number should be smaller than the second, or nothing comes out: print("str_1[-1 : -5]: ", str_1[-1 : -5], "<-") str_1[-1 : -5]: <- # Reverse a string print("-->", str_1[len(str_1) : 0]) print("-->", str_1[6 : 0]) print() """Here it skips the first character because that's how indexing works. It excludes the last indexing number specified.""" print("-->", str_1[len(str_1) : 0 : -1]) print("-->", str_1[len(str_1) : 0 : -1]) print() print("-->", str_1[len(str_1) : : -1]) print("-->", str_1[ : : -1]) print() print("-->", str_1[len(str_1)+1 : : -1]) print("-->", str_1[0 : len(str_1)+1]) --> --> --> !hsihsA ma I ,i --> !hsihsA ma I ,i --> !hsihsA ma I ,iH --> !hsihsA ma I ,iH --> !hsihsA ma I ,iH --> Hi, I am Ashish! When you are specifying number for an indexing range, the number can go beyond the actual string length but not when you are picking only a character: print("-->", str_1[len(str_1)+1]) IndexError Traceback (most recent call last) <ipython-input-32-ae4c8bcbdc17> in <module> ---> print("-->", str_1[len(str_1)+1]) IndexError: string index out of range # Check if a string is a palindrome str_2 = "mom" print(str_2 == str_2[::-1]) print(str_1 == str_1[::-1]) True False # Check if two string variables are actually same. Important Note: What we are going to see in this piece of code does not hold true for lists. v1 = str_2 v2 = str_2 v3 = 'mom' print("v1 == v2:", v1 == v2) print("v1 == v3:", v1 == v3) print("v1 is v2:", v1 is v2) print("v1 is v3:", v1 is v3) print("id(v1)", id(v1)) print("id(v3)", id(v3)) v1 == v2: True v1 == v3: True v1 is v2: True v1 is v3: True id(v1) 2053130113968 id(v3) 2053130113968 # Now trying the same thing with lists: animals = ['python','gopher'] more_animals = animals print("animals == more_animals:", animals == more_animals) #=> True print("animals is more_animals:", animals is more_animals) #=> True even_more_animals = ['python','gopher'] print("animals == even_more_animals:", animals == even_more_animals) #=> True print("animals is even_more_animals:", animals is even_more_animals) #=> False print("\nMemory addresses:") print("id(animals)", id(animals)) print("id(more_animals)", id(more_animals)) print("id(even_more_animals)", id(even_more_animals)) animals == more_animals: True animals is more_animals: True animals == even_more_animals: True animals is even_more_animals: False Memory addresses: id(animals) 2053130940992 id(more_animals) 2053130940992 id(even_more_animals) 2053130060928 Checking what happens to a string when replace a character in a string and to a list when we replace an element in it: owner = 'Ashish' pets = ['python', 'gopher'] print("owner:", owner) print("id(owner): ", id(owner)) print("id(pets): ", id(pets)) owner = owner.replace('A', 'X') # Note: we don't have a "replace()" method for Python lists. pets[0] = 'cat' print("owner:", owner) print("id(owner): ", id(owner)) print("id(pets): ", id(pets)) owner = owner.replace('X', 'A') pets[0] = 'python' print("owner:", owner) print("id(owner): ", id(owner)) print("id(pets): ", id(pets)) print("Trivial replacement:") owner = owner.replace('A', 'A') print("owner:", owner) print("id(owner): ", id(owner)) owner: Ashish id(owner): 2287299151536 id(pets): 2287299204096 owner: Xshish id(owner): 2287299080624 id(pets): 2287299204096 owner: Ashish id(owner): 2287298874672 id(pets): 2287299204096 Trivial replacement: owner: Ashish id(owner): 2287298874672 Now the question is: did it actually perform the trivial replace operation in this case or not?

Creating Replace For List

# a loop to do the replacement in-place words = ['I', 'like', 'chicken'] for i, word in enumerate(words): if word == 'chicken': words[i] = 'broccoli' print(words) ['I', 'like', 'broccoli'] # a shorter option if there’s always exactly one instance: words = ['I', 'like', 'chicken'] words[words.index('chicken')] = 'broccoli' print(words) ['I', 'like', 'broccoli'] # a list comprehension to create a new list: words = ['I', 'like', 'chicken'] new_words = ['broccoli' if word == 'chicken' else word for word in words] print(new_words) ['I', 'like', 'broccoli'] # any of which can be wrapped up in a function: words = ['I', 'like', 'chicken'] def replaced(sequence, old, new): return (new if x == old else x for x in sequence) new_words = list(replaced(words, 'chicken', 'broccoli')) print(new_words) ['I', 'like', 'broccoli'] #-#-#-#-#-#-#-#-#-#

Python's in-built support for String and List

1. reversed() >>> s1 = "Hi, I am Ashish!" >>> ''.join(reversed(s1)) '!hsihsA ma I ,iH' >>> reversed(s1) <reversed object at 0x000001D587048518> >>> list(reversed(s1)) ['!', 'h', 's', 'i', 'h', 's', 'A', ' ', 'm', 'a', ' ', 'I', ' ', ',', 'i', 'H'] >>> str(reversed(s1)) '<reversed object at 0x000001D587048B70>' >>> >>> l1 = ['Ashish', 'Rashmi', 'Smita'] >>> reversed(l1) <list_reverseiterator object at 0x000001D5870702B0> >>> list(reversed(l1)) ['Smita', 'Rashmi', 'Ashish'] >>> 2. sorted() >>> sorted(s1) [' ', ' ', ' ', '!', ',', 'A', 'H', 'I', 'a', 'h', 'h', 'i', 'i', 'm', 's', 's'] >>> >>> sorted(l1) ['Ashish', 'Rashmi', 'Smita'] >>> >>> l2 = ['Rashmi', 'Ashish', 'Smita'] >>> sorted(l2) ['Ashish', 'Rashmi', 'Smita'] >>> 3. len() >>> len(s1) 16 >>> len(l1) 3 >>> Tags: Technology,Python,Anaconda,Natural Language Processing,

Sunday, May 16, 2021

Python (1) (virtualenv and condaenv) [20210516]



Hello friends, to begin with the first thing we have to do is installation:

% You can download and install 'Python' from here: Python Downloads
% Or, you can download Anaconda from here: Anaconda Downloads

For those who do not know what Anaconda is, here is a one-liner: It is your data science toolkit. [As written on the Anaconda website]

You should note that knowledge of both Python and Anaconda is important as Anaconda makes things very simple and manageable, but some organization will not allow you to install 'Anaconda' and you would have to work with Python only.

Today as this is the first session that I am taking, we would be discussing about installation of Python on Windows and Linux machines. That is because this is an especially important step as in future you would have to install and work with a lot of Python packages and at times there would conflicts as you would keep on increasing the number of package installations in your system.
For example: if you do a “pip install tensorflow” on your system that will install the latest version of the TensorFlow and now if you try to install a package (let us say) Elephas that would lead to conflict in packages as the dependencies of Elephas require you to have an incredibly old version of TensorFlow.

The dependencies of the Elephas as of 2020-July were:

Flask==1.0.2
hyperas==0.4
pyspark==2.4.0
six==1.11.0
tensorflow==1.15.2
pydl4j>=0.1.3
keras==2.2.5

Now we check the current version of TensorFlow available:

CMD>pip install tensorflow==

ERROR: Could not find a version that satisfies the requirement tensorflow== (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0a0, 2.0.0b0, 2.0.0b1, 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0rc0, 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0)
ERROR: No matching distribution found for tensorflow==

Latest version of TensorFlow is 2.5.0.

Ref: Distributed Deep Learning Using Python Packages Elephas, Keras, Tensorflow and PySpark

This problem of dependencies is not only between packages but also between the version of Python you are using and a package such as Rasa.

As of Rasa 2.6.x, you need a Python from one of the following versions only: 3.6, 3.7 or 3.8 
[ Ref: 
% rasa/installation  
% rasa/2.5.x/installation ]

Even though the current version of Python is: 3.9

What is the solution? 
To deal with this we have a solution called:
1. 'virtual environment' in Python
2. 'conda environment' in Anaconda

We have an older version of Python in my system:


C:\Users\Ashish Jain>python
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> print("Hi")
Hi
>>>
>>> exit()
C:\Users\Ashish Jain>

On a sidenote, if you want to see where your Python.exe is:
1. On Ubuntu, use "which python"
2. On Windows, use "where python"


C:\Users\Ashish Jain>where python
E:\programfiles\Anaconda3\python.exe
C:\Users\Ashish Jain\AppData\Local\Microsoft\WindowsApps\python.exe 

Setting up "virtualenv"

Step 1: Install "virtualenv" C:\Users\Ashish Jain>pip install virtualenv Collecting virtualenv Downloading virtualenv-20.4.6-py2.py3-none-any.whl (7.2 MB) |███| 7.2 MB 1.6 MB/s Collecting appdirs[2,>=1.4.3 Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in e:\programfiles\anaconda3\lib\site-packages (from virtualenv) (1.7.0) Requirement already satisfied: six[2,>=1.9.0 in e:\programfiles\anaconda3\lib\site-packages (from virtualenv) (1.15.0) Collecting distlib[1,>=0.3.1 Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB) |███| 335 kB 3.2 MB/s Requirement already satisfied: filelock[4,>=3.0.0 in e:\programfiles\anaconda3\lib\site-packages (from virtualenv) (3.0.12) Requirement already satisfied: zipp>=0.5 in e:\programfiles\anaconda3\lib\site-packages (from importlib-metadata>=0.12; python_version < "3.8"->virtualenv) (3.1.0) Installing collected packages: appdirs, distlib, virtualenv Successfully installed appdirs-1.4.4 distlib-0.3.1 virtualenv-20.4.6 Step 2: Check where it is installed. C:\Users\Ashish Jain>where virtualenv E:\programfiles\Anaconda3\Scripts\virtualenv.exe Step 3: "virtualenv" creates a directory so you need to (additionally) set up a folder (like "my_workspace") where you would create virtual environments. Related projects, that build abstractions on top of virtualenv: % virtualenvwrapper - a useful set of scripts for creating and deleting virtual environments % pew - provides a set of commands to manage multiple virtual environments % tox - a generic virtualenv management and test automation command line tool, driven by a tox.ini configuration file % nox - a tool that automates testing in multiple Python environments, similar to tox, driven by a noxfile.py configuration file Ref: virtualenv Documentation C:\Users\Ashish Jain>cd OneDrive/Desktop/my_workspace Important difference between "Conda environment" and "Virtualenv": With "virtualenv" you cannot install lower (or previous) versions of Python but a higher (or newer) version. While, this limitation is not there in "conda env". C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>virtualenv rasa_env --python=python3.8 RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.8' C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>virtualenv rasa_env_2 --python=python3.8 RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.8' C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>virtualenv rasa_env_2 --python=python3.6 created virtual environment CPython3.6.6.final.0-64 in 12325ms creator CPython3Windows(dest=C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env_2, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Ashish Jain\AppData\Local\pypa\virtualenv) added seed packages: pip==21.1.1, setuptools==56.0.0, wheel==0.36.2 activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>virtualenv rasa_env_3 --python=python3.8 RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.8' Step 4: We locate our "activate" file if we are on Ubuntu and "activate.bat" file if we are on Windows. C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>dir /s "activate" Volume in drive C is Windows Volume Serial Number is 8139-90C0 Directory of C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts 05/16/2021 12:54 AM 2,179 activate 1 File(s) 2,179 bytes Total Files Listed: 1 File(s) 2,179 bytes 0 Dir(s) 62,928,424,960 bytes free View 1: C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>dir /s "activate*" Volume in drive C is Windows Volume Serial Number is 8139-90C0 Directory of C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts 05/16/2021 12:54 AM 2,179 activate 05/16/2021 12:54 AM 1,052 activate.bat 05/16/2021 12:54 AM 3,102 activate.fish 05/16/2021 12:55 AM 1,755 activate.ps1 05/16/2021 12:55 AM 1,193 activate.xsh 05/16/2021 12:55 AM 1,193 activate_this.py 6 File(s) 10,474 bytes Total Files Listed: 12 File(s) 20,956 bytes 0 Dir(s) 62,889,410,560 bytes free View 2: C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>dir /s /b "activate*" C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts\activate C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts\activate.bat C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts\activate.fish C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts\activate.ps1 C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts\activate.xsh C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts\activate_this.py C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts>activate.bat (rasa_env) C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace\rasa_env\Scripts> Do you see this "(rasa_env)"? This means you are in venv "rasa_env".

Activate 'Python CLI' (Command Line Interface). Python CLI is also known as Python shell.

And Try Some Commands... (rasa_env) C:\Users\Ashish Jain\OneDrive\Desktop\my_workspace>python Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. >>> Dealing with numeric data Addition >>> >>> 7 + 3 10 >>> Division >>> 7 / 3 2.3333333333333335 >>> >>> 7 // 3 2 >>> Modulo (returns the remainder from division operation) >>> 7 % 3 1 >>> Data Type: Strings >>> username = "Ashish" >>> print(username) Ashish >>> Note: You can do indexing on a String. >>> username[0] 'A' >>> But a Python String is immutable like a 'Tuple'. >>> username[0] = 'I' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'str' object does not support item assignment >>> Output Formatting in Four Ways: Output Formatting #1 >>> print(F"Logged in as: {username}") Logged in as: Ashish >>> Output Formatting #2 >>> print("Logged in as: {}".format('Ashish')) Logged in as: Ashish >>> >>> print("Logged in as: {}".format(username)) Logged in as: Ashish >>> Output Formatting #3 >>> firstname = 'Ashish' >>> lastname = 'Jain' >>> print("Logged in as: %s %s" % (firstname, lastname)) Logged in as: Ashish Jain >>> Output Formatting #4 >>> print("Logged in as:", firstname, lastname) Logged in as: Ashish Jain >>> >>> print("Logged in as:", username) Logged in as: Ashish >>> Data Type: List List is a collection of elements (may not be of similar type as you would see in programming language C or C++). >>> l = ['a', 1] >>> l[0] 'a' >>> l[1] 1 >>> Data Type: Tuple Tuple is like the List data type with one difference that it is immutable. >>> my_tuple = (1, 2, 3) >>> my_tuple[0] 1 >>> my_tuple[0:3] (1, 2, 3) >>> >>> my_tuple[0] = 4 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'tuple' object does not support item assignment >>> Data Type: Dict (Dictionary) Important Note: What you are seeing as error for an attempt to concatenate two "dict" using "|" pipe character has been added as a feature in Python 3.9.0. >>> {'a': 'b'} | {'c': 'd'} Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for |: 'dict' and 'dict' >>> Multi-line String and Printing it. >>> >>> print("""Hi! ... I am Ashish! ... I love Python!""") Hi! I am Ashish! I love Python! >>> Checking the type of a variable: >>> type(username) <class 'str'> >>> >>> isinstance(username, str) True >>> >>> isinstance(username, int) False >>> isinstance(5, int) True Sometimes, the error logs of Python are not very clear. For example, in the example below we entered second argument as ('str') that is a string, instead of the keyword (str), so Python returns an error log TypeError: isinstance() arg 2 must be a type or tuple of types. Here by "type" it means "Data Type". >>> isinstance(username, 'str') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: isinstance() arg 2 must be a type or tuple of types Immutability of Strings and Tuples % TypeError: 'tuple' object does not support item assignment % TypeError: 'str' object does not support item assignment

Working with "conda" (with Anaconda)

Launch 'Anaconda Prompt'. (base) C:\Users\Ashish Jain>conda create -n py39 python=3.9 Collecting package metadata (repodata.json): done Solving environment: done ==> WARNING: A newer version of conda exists. <== current version: 4.8.5 latest version: 4.10.1 Please update conda by running $ conda update -n base -c defaults conda ## Package Plan ## environment location: E:\programfiles\Anaconda3\envs\py39 added / updated specs: - python=3.9 The following packages will be downloaded: package | build ---------------------------|----------------- ca-certificates-2021.4.13 | haa95532_1 150 KB certifi-2020.12.5 | py39haa95532_0 144 KB openssl-1.1.1k | h2bbff1b_0 5.7 MB pip-21.0.1 | py39haa95532_0 2.0 MB python-3.9.4 | h6244533_0 19.8 MB setuptools-52.0.0 | py39haa95532_0 930 KB sqlite-3.35.4 | h2bbff1b_0 1.2 MB tzdata-2020f | h52ac0ba_0 123 KB vc-14.2 | h21ff451_1 8 KB vs2015_runtime-14.27.29016 | h5e58377_2 2.2 MB wheel-0.36.2 | pyhd3eb1b0_0 31 KB wincertstore-0.2 | py39h2bbff1b_0 15 KB ------------------------------------------------------------ Total: 32.3 MB The following NEW packages will be INSTALLED: ca-certificates pkgs/main/win-64::ca-certificates-2021.4.13-haa95532_1 ... tzdata pkgs/main/noarch::tzdata-2020f-h52ac0ba_0 ... wheel pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0 wincertstore pkgs/main/win-64::wincertstore-0.2-py39h2bbff1b_0 Proceed ([y]/n)? y Downloading and Extracting Packages... Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # $ conda activate py39 # To deactivate an active environment, use # $ conda deactivate Note: conda create -n py39 -c conda-forge python=3.9 (base) C:\Users\Ashish Jain>python Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() Note here: We were in "base" environment with Python 3.7.1 but we were still able to create an environment with higher version (Python 3.9.4). (base) C:\Users\Ashish Jain>conda activate py39 (py39) C:\Users\Ashish Jain>python Python 3.9.4 (default, Apr 9 2021, 11:43:21) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() (py39) C:\Users\Ashish Jain> The concatenation of two "dict" using "pipe" (|) character: (py39) C:\Users\Ashish Jain>python Python 3.9.4 (default, Apr 9 2021, 11:43:21) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. >>> >>> {'a': 'b'} | {'c': 'd'} {'a': 'b', 'c': 'd'} >>>

Putting all of the above in a '.py file' or a 'Python script'.

print(7 + 3, end='\n\n') print(7 / 3, end='\n\n') print(7 // 3, end='\n\n') print(7 % 3, end='\n\n') username = "Ashish" print(username, end='\n\n') print(F"Logged in as: {username}") Output: (base) C:\Users\Ashish Jain\OneDrive\Desktop>python script.py 10 2.3333333333333335 2 1 Ashish Logged in as: Ashish (base) C:\Users\Ashish Jain\OneDrive\Desktop>

Putting all of the above in a 'Jupyter Notebook'.

The way to start Jupyter Notebook is through the command: "jupyter notebook" (base) C:\Users\Ashish Jain\OneDrive\Desktop>jupyter notebook [I 2021-05-16 17:00:42.136 LabApp] JupyterLab extension loaded from E:\programfiles\Anaconda3\lib\site-packages\jupyterlab [I 2021-05-16 17:00:42.136 LabApp] JupyterLab application directory is E:\programfiles\Anaconda3\share\jupyter\lab [I 17:00:42.172 NotebookApp] Serving notebooks from local directory: C:\Users\Ashish Jain\OneDrive\Desktop [I 17:00:42.172 NotebookApp] Jupyter Notebook 6.3.0 is running at: [I 17:00:42.173 NotebookApp] http://localhost:8888/?token=b9833146c3b56e7dc6632be0e513c541a436d84ff42b1511 [I 17:00:42.173 NotebookApp] or http://127.0.0.1:8888/?token=b9833146c3b56e7dc6632be0e513c541a436d84ff42b1511 [I 17:00:42.174 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 17:00:42.370 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/Ashish%20Jain/AppData/Roaming/jupyter/runtime/nbserver-764-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=b9833146c3b56e7dc6632be0e513c541a436d84ff42b1511 or http://127.0.0.1:8888/?token=b9833146c3b56e7dc6632be0e513c541a436d84ff42b1511 This opens up a window in your browser:
In the image above, you can see the dropdown named "New". Click on this dropdown and select something like "Python 3" (the option coming for me). The items in this dropdown are your kernels that is an advanced concept for this post.
Link to the session recording: YouTube Tags: Technology,Python,Anaconda,Windows CMD,

Wednesday, February 3, 2021

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



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, rfc3986, ipython-genutils, h11, traitlets, pywin32, pyrsistent, httpcore, attrs, zope.interface, websockets, tornado, pyzmq, PyHamcrest, oauthlib, multidict, jupyter-core, jsonschema, incremental, hyperlink, httpx, httptools, constantly, Automat, aiofiles, webencodings, Twisted, sanic, requests-oauthlib, pytz, pyreadline, pygments, nest-asyncio, nbformat, jupyter-client, characteristic, async-generator, zope.event, werkzeug, wcwidth, tzlocal, Tubes, testpath, tensorboard-plugin-wit, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, snowballstemmer, sanic-plugins-framework, pillow, pandocfilters, pamqp, numpy, nbclient, mistune, markdown, kiwisolver, jupyterlab-pygments, imagesize, humanfriendly, greenlet, google-auth-oauthlib, entrypoints, docutils, defusedxml, cycler, bleach, babel, alabaster, absl-py, wrapt, typing, typeguard, tqdm, threadpoolctl, termcolor, tensorflow-estimator, tensorboard, tabulate, sphinx, sortedcontainers, simplejson, scipy, sanic-cors, ruamel.yaml.clib, requests-toolbelt, redis, PyYAML, python-engineio, python-crfsuite, pymongo, PyJWT, prompt-toolkit, ply, pathlib, opt-einsum, nbconvert, matplotlib, klein, keras-preprocessing, joblib, itsdangerous, httplib2, h5py, google-pasta, gevent, gast, future, docopt, dnspython, dm-tree, decorator, coloredlogs, cloudpickle, astunparse, apscheduler, aiormq, aiohttp, webexteamssdk, ujson, twilio, terminaltables, tensorflow-probability, tensorflow-hub, tensorflow-addons, tensorflow, SQLAlchemy, slackclient, sklearn-crfsuite, sentry-sdk, scikit-learn, sanic-jwt, ruamel.yaml, rocketchat-API, regex, rasa-sdk, rasa-nlu, questionary, python-telegram-bot, python-socketio, pyTelegramBotAPI, pykwalify, pydot, psycopg2-binary, pandoc, oauth2client, networkx, nbsphinx, mattermostwrapper, keras, kafka-python, jsonpickle, graphviz, flask, fbmessenger, fakeredis, ConfigArgParse, colorhash, colorclass, aio-pika, 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, tensorflow, redis, scikit-learn, pykwalify, jsonpickle, typing, graphviz, apscheduler, ruamel.yaml, h5py, nbsphinx, coloredlogs, networkx, slackclient, rasa-nlu, flask, python-telegram-bot, six, fbmessenger, future, fakeredis, ConfigArgParse, numpy, requests, Keras, 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, rfc3986, h11, httpcore, websockets, multidict, httpx, httptools, aiofiles, sanic, yarl, wcwidth, sanic-plugins-framework, pamqp, numpy, attrs, absl-py, typeguard, tqdm, tensorflow-estimator, tabulate, sanic-cors, requests-toolbelt, python-engineio, python-crfsuite, pymongo, PyJWT, prompt-toolkit, joblib, httplib2, dnspython, dm-tree, coloredlogs, cloudpickle, aiormq, aiohttp, webexteamssdk, ujson, twilio, terminaltables, tensorflow-probability, tensorflow-hub, tensorflow-addons, tensorflow, SQLAlchemy, sklearn-crfsuite, sentry-sdk, scikit-learn, sanic-jwt, rocketchat-API, regex, rasa-sdk, questionary, python-socketio, pyTelegramBotAPI, pykwalify, pydot, psycopg2-binary, oauth2client, mattermostwrapper, kafka-python, jsonpickle, fbmessenger, colorhash, colorclass, aio-pika, 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, tensorflow-estimator, tabulate, sanic-cors, requests-toolbelt, python-engineio, python-crfsuite, pymongo, PyJWT, prompt-toolkit, joblib, httplib2, dnspython, dm-tree, coloredlogs, cloudpickle, aiormq, aiohttp, webexteamssdk, ujson, twilio, terminaltables, tensorflow-probability, tensorflow-hub, tensorflow-addons, tensorflow, SQLAlchemy, sklearn-crfsuite, sentry-sdk, scikit-learn, sanic-jwt, rocketchat-API, regex, rasa-sdk, questionary, python-socketio, pyTelegramBotAPI, pykwalify, pydot, psycopg2-binary, oauth2client, mattermostwrapper, kafka-python, jsonpickle, fbmessenger, colorhash, colorclass, aio-pika, 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 aiormq-3.3.1 cloudpickle-1.4.1 colorclass-2.2.0 coloredlogs-14.3 colorhash-1.0.3 dm-tree-0.1.5 dnspython-1.16.0 fbmessenger-6.0.0 httplib2-0.18.1 joblib-0.15.1 jsonpickle-1.4.2 kafka-python-2.0.2 mattermostwrapper-2.2 oauth2client-4.1.3 prompt-toolkit-2.0.10 psycopg2-binary-2.8.6 pyTelegramBotAPI-3.7.6 pydot-1.4.1 pykwalify-1.7.0 pymongo-3.10.1 python-crfsuite-0.9.7 python-engineio-3.13.2 python-socketio-4.6.1 questionary-1.5.2 rasa-2.2.9 rasa-sdk-2.2.0 regex-2020.9.27 requests-toolbelt-0.9.1 rocketchat-API-1.9.1 sanic-cors-0.10.0.post3 sanic-jwt-1.5.0 scikit-learn-0.23.2 sentry-sdk-0.19.5 sklearn-crfsuite-0.3.6 tabulate-0.8.7 tensorflow-2.3.2 tensorflow-addons-0.12.0 tensorflow-estimator-2.3.0 tensorflow-hub-0.9.0 tensorflow-probability-0.11.1 terminaltables-3.1.0 tqdm-4.50.2 twilio-6.45.4 ujson-3.2.0 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, ujson, matplotlib, mattermostwrapper, pyTelegramBotAPI, kafka-python, scipy, python-dateutil, pytz, ruamel.yaml, PyJWT, requests, jsonschema, attrs, oauth2client, python-engineio, pymongo, slackclient, tensorflow-addons, python-socketio, psycopg2-binary, SQLAlchemy, colorhash, joblib, rasa-sdk, tensorflow-estimator, cloudpickle, sentry-sdk, scikit-learn, multidict, coloredlogs, pydot, regex, sanic, setuptools, jsonpickle, networkx, twilio, tensorflow-hub, sanic-cors, tqdm, sanic-jwt, colorama, fbmessenger, colorclass, aiohttp, prompt-toolkit, apscheduler, boto3, webexteamssdk, sklearn-crfsuite, terminaltables, async-generator, packaging, numpy, questionary, aio-pika, tensorflow, absl-py, redis, rocketchat-API, 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, rfc3986, idna, h11, urllib3, pyasn1, httpcore, chardet, websockets, six, rsa, requests, pyasn1-modules, oauthlib, multidict, httpx, httptools, cachetools, aiofiles, sanic, requests-oauthlib, python-dateutil, pyreadline, pycparser, jmespath, google-auth, yarl, werkzeug, wcwidth, tensorboard-plugin-wit, sanic-plugins-framework, pytz, protobuf, pamqp, numpy, markdown, humanfriendly, grpcio, google-auth-oauthlib, cffi, botocore, attrs, async-timeout, absl-py, wrapt, tzlocal, typeguard, threadpoolctl, termcolor, tensorboard, scipy, s3transfer, ruamel.yaml.clib, PyYAML, pyrsistent, pyparsing, pillow, opt-einsum, kiwisolver, keras-preprocessing, h5py, google-pasta, gast, future, docopt, decorator, cycler, cryptography, astunparse, slackclient, ruamel.yaml, redis, packaging, networkx, matplotlib, jsonschema, colorama, boto3, async-generator, apscheduler
Successfully installed PyYAML-5.4.1 absl-py-0.10.0 aiofiles-0.6.0 apscheduler-3.6.3 astunparse-1.6.3 async-generator-1.10 async-timeout-3.0.1 attrs-20.2.0 boto3-1.17.0 botocore-1.20.0 cachetools-4.2.1 cffi-1.14.4 chardet-3.0.4 colorama-0.4.4 cryptography-3.3.1 cycler-0.10.0 decorator-4.4.2 docopt-0.6.2 future-0.18.2 gast-0.3.3 google-auth-1.24.0 google-auth-oauthlib-0.4.2 google-pasta-0.2.0 grpcio-1.35.0 h11-0.9.0 h5py-2.10.0 httpcore-0.11.1 httptools-0.1.1 httpx-0.15.4 humanfriendly-9.1 idna-2.10 jmespath-0.10.0 jsonschema-3.2.0 keras-preprocessing-1.1.2 kiwisolver-1.3.1 markdown-3.3.3 matplotlib-3.3.4 multidict-4.7.6 networkx-2.5 numpy-1.18.5 oauthlib-3.1.0 opt-einsum-3.3.0 packaging-20.9 pamqp-2.3.0 pillow-8.1.0 protobuf-3.14.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.20 pyparsing-2.4.7 pyreadline-2.1 pyrsistent-0.17.3 python-dateutil-2.8.1 pytz-2020.5 redis-3.5.3 requests-2.25.1 requests-oauthlib-1.3.0 rfc3986-1.4.0 rsa-4.7 ruamel.yaml-0.16.12 ruamel.yaml.clib-0.2.2 s3transfer-0.3.4 sanic-20.9.0 sanic-plugins-framework-0.9.5 scipy-1.6.0 six-1.15.0 slackclient-2.9.3 sniffio-1.2.0 tensorboard-2.4.1 tensorboard-plugin-wit-1.8.0 termcolor-1.1.0 threadpoolctl-2.1.0 typeguard-2.10.0 tzlocal-2.1 urllib3-1.26.3 wcwidth-0.2.5 websockets-8.1 werkzeug-1.0.1 wrapt-1.12.1 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, tqdm, joblib, rasa-sdk, aio-pika, colorclass, redis, kafka-python, fbmessenger, packaging, sentry-sdk, tensorflow, requests, ujson, apscheduler, prompt-toolkit, tensorflow-addons, pyTelegramBotAPI, oauth2client, mattermostwrapper, psycopg2-binary, tensorflow-probability, sanic, scikit-learn, tensorflow-estimator, rocketchat-API, scipy, boto3, jsonschema, networkx, terminaltables, attrs, pymongo, numpy, python-socketio, tensorflow-hub, cloudpickle, python-engineio, aiohttp, jsonpickle, setuptools, questionary, async-generator, twilio, sanic-jwt, pykwalify, python-dateutil, pytz, regex, ruamel.yaml, slackclient, webexteamssdk, pydot, coloredlogs, sklearn-crfsuite, absl-py, colorama, PyJWT, multidict, matplotlib, SQLAlchemy, 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>

Friday, January 29, 2021

Installing RASA using YML File in Anaconda



Before starting, a note about creating, activating, deactivating, removing a Conda environment and listing all the installed environments:

(base) CMD>conda create -n my_env_name
(base) CMD>conda activate my_env_name
(my_env_name) CMD>conda deactivate
(base) CMD>conda remove -n my_env_name --all
(base) CMD>conda env list

AFTER INSTALLATION OF "Microsoft Visual C++ 14.0" FROM "Build Tools for Visual Studio" AS WE ARE ON WINDOWS OS:

We run an env.yml file containing following code:

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

-- -- -- -- -- 

(base) C:\Users\ashish\Desktop\code>conda env create -f env.yml

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

Downloading and Extracting Packages
urllib3-1.26.3       | 99 KB     | #### | 100%
...
cython-blis-0.7.4    | 5.6 MB    | #### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: | Ran pip subprocess with arguments:
['e:\\Anaconda3\\envs\\my_rasa_env\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\\Users\\ashish\\Desktop\\code\\condaenv.7w4auwk3.requirements.txt']
Pip subprocess output:
Collecting rasa-core
Using cached rasa_core-0.14.5-py3-none-any.whl (212 kB)
Collecting rocketchat-API~=0.6.0
...
Collecting characteristic
Using cached characteristic-14.3.0-py2.py3-none-any.whl (15 kB)
Building wheels for collected packages: Twisted
Building wheel for Twisted (setup.py): started
Building wheel for Twisted (setup.py): still running...
Building wheel for Twisted (setup.py): finished with status 'done'
Created wheel for Twisted: filename=Twisted-20.3.0-cp38-cp38-win_amd64.whl size=3098905 sha256=6eca0e3e573f4230d113548152f64c5aec4d0e7fa2d95b78caeaa5220de02bc9
Stored in directory: c:\users\ashish\appdata\local\pip\cache\wheels\f2\36\1b\99fe6d339e1559e421556c69ad7bc8c869145e86a756c403f4
Successfully built Twisted
Installing collected packages: ipython-genutils, ... rasa-core
Attempting uninstall: chardet
  Found existing installation: chardet 4.0.0
  Uninstalling chardet-4.0.0:
    Successfully uninstalled chardet-4.0.0
Successfully installed Automat-20.2.0 ConfigArgParse-1.2.3 Jinja2-2.11.2 MarkupSafe-1.1.1 PyHamcrest-2.0.2 PyYAML-5.4.1 Tubes-0.2.0 Twisted-20.3.0 Werkzeug-1.0.1 absl-py-0.11.0 aiohttp-3.7.3 alabaster-0.7.12 apscheduler-3.6.3 astunparse-1.6.3 async-generator-1.10 async-timeout-3.0.1 babel-2.9.0 bleach-3.2.3 boto3-1.16.62 botocore-1.19.62 cachetools-4.2.1 characteristic-14.3.0 chardet-3.0.4 click-7.1.2 cloudpickle-1.6.0 colorama-0.4.4 coloredlogs-15.0 constantly-15.1.0 cycler-0.10.0 decorator-4.4.2 defusedxml-0.6.0 docopt-0.6.2 docutils-0.16 entrypoints-0.3 fakeredis-1.4.5 fbmessenger-4.3.1 flask-1.1.2 flatbuffers-1.12 future-0.18.2 gast-0.3.3 gevent-21.1.2 google-auth-1.24.0 google-auth-oauthlib-0.4.2 google-pasta-0.2.0 graphviz-0.16 greenlet-1.0.0 grpcio-1.32.0 h5py-2.10.0 humanfriendly-9.1 hyperlink-21.0.0 imagesize-1.2.0 incremental-17.5.0 ipython-genutils-0.2.0 itsdangerous-1.1.0 jmespath-0.10.0 joblib-1.0.0 jsonpickle-1.5.0 jupyter-client-6.1.11 jupyter-core-4.7.0 jupyterlab-pygments-0.1.2 keras-2.4.3 keras-preprocessing-1.1.2 kiwisolver-1.3.1 klein-20.6.0 markdown-3.3.3 matplotlib-3.3.4 mistune-0.8.4 multidict-5.1.0 nbclient-0.5.1 nbconvert-6.0.7 nbformat-5.1.2 nbsphinx-0.8.1 nest-asyncio-1.5.1 networkx-2.5 oauthlib-3.1.0 opt-einsum-3.3.0 packaging-20.8 pandoc-1.0.2 pandocfilters-1.4.3 pathlib-1.0.1 pillow-8.1.0 ply-3.11 protobuf-3.14.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pygments-2.7.4 pykwalify-1.6.0 pyparsing-2.4.7 pyreadline-2.1 python-dateutil-2.8.1 python-telegram-bot-13.1 pytz-2020.5 pywin32-300 pyzmq-22.0.1 rasa-core-0.8.6 rasa-nlu-0.11.5 redis-3.5.3 requests-oauthlib-1.3.0 rsa-4.7 ruamel.yaml-0.16.12 ruamel.yaml.clib-0.2.2 s3transfer-0.3.4 scikit-learn-0.24.1 scipy-1.6.0 simplejson-3.17.2 slackclient-2.9.3 snowballstemmer-2.1.0 sortedcontainers-2.3.0 sphinx-3.4.3 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-1.0.3 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.4 tensorboard-2.4.1 tensorboard-plugin-wit-1.8.0 tensorflow-2.4.1 tensorflow-estimator-2.4.0 termcolor-1.1.0 testpath-0.4.4 threadpoolctl-2.1.0 tornado-6.1 traitlets-5.0.5 typing-3.7.4.3 typing-extensions-3.7.4.3 tzlocal-2.1 webencodings-0.5.1 wrapt-1.12.1 yarl-1.6.3 zope.event-4.5.0 zope.interface-5.2.0

done
#
# To activate this environment, use
#
#     $ conda activate my_rasa_env
#
# To deactivate an active environment, use
#
#     $ conda deactivate 

Testing the installation

(base) C:\Users\ashish>conda activate my_rasa_env

(my_rasa_env) C:\Users\ashish>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\my_rasa_env\lib\site-packages
Requires: tqdm, python-telegram-bot, pandoc, tensorflow, redis, Keras, coloredlogs, fbmessenger, pykwalify, scikit-learn, six, numpy, flask, graphviz, slackclient, apscheduler, nbsphinx, fakeredis, future, rasa-nlu, ConfigArgParse, jsonpickle, requests, ruamel.yaml, typing, h5py, networkx
Required-by: 

(my_rasa_env) C:\Users\ashish>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\my_rasa_env\lib\site-packages
Requires: tqdm, matplotlib, numpy, klein, cloudpickle, boto3, typing, jsonschema, future, gevent, six, simplejson, pathlib, requests
Required-by: rasa-core

(my_rasa_env) C:\Users\ashish>pip show rasa
WARNING: Package(s) not found: rasa

We encountered some errors during our attempts to install RASA, following are the error logs and resolutions.

1: Erroneous code for environment "env.yml" as "rasa" is not available in channel "conda-forge":

name: rasa
channels:
- conda-forge
dependencies:
- pip
- rasa 

ERROR:

(base) C:\Users\ashish\Desktop\code>conda env create -f env.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
- rasa 

(base) C:\Users\ashish\Desktop\code>conda create -n erasa rasa
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

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

- rasa

Current channels:

- 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. 
  
2: Erroneous code for installing "rasa" through "pip":

The RASA documentations says this: You can install RASA using "pip3 install rasa" [ Ref: RASA ] 

ENV.YML:
name: rasa
channels:
- conda-forge
dependencies:
- pip
- pip:
  - rasa

Point to note: It does download "rasa-core" and "rasa-nlu", that too a couple dozen versions.

(base) C:\Users\ashish\Desktop\code>conda env create -f env.yml
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages
wheel-0.36.2         | 31 KB     | #### | 100%
wincertstore-0.2     | 15 KB     | #### | 100%
vs2015_runtime-14.28 | 1.4 MB    | #### | 100%
pip-21.0             | 1.1 MB    | #### | 100%
sqlite-3.34.0        | 1.2 MB    | #### | 100%
certifi-2020.12.5    | 144 KB    | #### | 100%
tzdata-2020f         | 121 KB    | #### | 100%
python_abi-3.9       | 4 KB      | #### | 100%
vc-14.2              | 12 KB     | #### | 100%
python-3.9.1         | 19.9 MB   | #### | 100%
setuptools-49.6.0    | 954 KB    | #### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: - Ran pip subprocess with arguments:
['e:\\Anaconda3\\envs\\rasa\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\\Users\\ashish\\Desktop\\code\\condaenv.fjji_o0b.requirements.txt']
Pip subprocess output:
Downloading rasa-1.10.2-py3-none-any.whl (510 kB)
Downloading pykwalify-1.7.0-py2.py3-none-any.whl (40 kB)
Downloading cloudpickle-1.3.0-py2.py3-none-any.whl (26 kB)
Downloading colorclass-2.2.0.tar.gz (17 kB)
Downloading matplotlib-3.2.2-cp39-cp39-win_amd64.whl (8.9 MB)
Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)
Downloading networkx-2.4-py3-none-any.whl (1.6 MB)
Downloading sanic-19.12.4-py3-none-any.whl (73 kB)
Downloading tensorflow_estimator-2.1.0-py2.py3-none-any.whl (448 kB)
Downloading absl-py-0.9.0.tar.gz (104 kB)
Downloading boto3-1.16.59-py2.py3-none-any.whl (130 kB)
Downloading python_engineio-3.12.1-py2.py3-none-any.whl (49 kB)
Downloading numpy-1.19.5-cp39-cp39-win_amd64.whl (13.3 MB)
Downloading SQLAlchemy-1.3.22-cp39-cp39-win_amd64.whl (1.2 MB)
Downloading fbmessenger-6.0.0-py2.py3-none-any.whl (11 kB)
Downloading kafka_python-1.4.7-py2.py3-none-any.whl (266 kB)
Downloading pydot-1.4.1-py2.py3-none-any.whl (19 kB)
Downloading questionary-1.5.2-py3-none-any.whl (26 kB)
Downloading async_generator-1.10-py3-none-any.whl (18 kB)
Downloading webexteamssdk-1.3.tar.gz (56 kB)
Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Downloading tensorflow_probability-0.9.0-py2.py3-none-any.whl (3.2 MB)
Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Downloading ruamel.yaml-0.16.12-py2.py3-none-any.whl (111 kB)
Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Downloading Sanic_Cors-0.10.0.post3-py2.py3-none-any.whl (17 kB)
Downloading ujson-2.0.3.tar.gz (7.1 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
  Preparing wheel metadata: started
  Preparing wheel metadata: finished with status 'done'

Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
Downloading terminaltables-3.1.0.tar.gz (12 kB)
Downloading tensorflow_hub-0.8.0-py2.py3-none-any.whl (101 kB)
Downloading rasa_sdk-1.10.3-py3-none-any.whl (39 kB)
Downloading coloredlogs-10.0-py2.py3-none-any.whl (47 kB)
Downloading pika-1.1.0-py2.py3-none-any.whl (148 kB)
Downloading rasa-1.10.1-py3-none-any.whl (509 kB)
Downloading rasa-1.10.0-py3-none-any.whl (509 kB)
Downloading rasa-1.9.7-py3-none-any.whl (497 kB)
Downloading tensorflow_hub-0.7.0-py2.py3-none-any.whl (89 kB)
Downloading python_engineio-3.11.2-py2.py3-none-any.whl (49 kB)
Requirement already satisfied: setuptools>=41.0.0 in e:\anaconda3\envs\rasa\lib\site-packages (from rasa->-r C:\Users\ashish\Desktop\code\condaenv.fjji_o0b.requirements.txt (line 1)) (49.6.0.post20210108)
Downloading rocketchat_API-0.6.36-py3-none-any.whl (9.5 kB)
Downloading ruamel.yaml-0.15.100.tar.gz (318 kB)
Downloading matplotlib-3.1.3.tar.gz (40.9 MB)
Downloading webexteamssdk-1.1.1.tar.gz (48 kB)
Downloading rasa-1.9.6-py3-none-any.whl (497 kB)
Downloading rasa-1.9.5-py3-none-any.whl (496 kB)
Downloading rasa-1.9.4-py3-none-any.whl (495 kB)
Downloading rasa-1.9.3-py3-none-any.whl (495 kB)
Downloading rasa-1.9.2-py3-none-any.whl (495 kB)
Downloading rasa-1.9.1-py3-none-any.whl (495 kB)
Downloading rasa-1.9.0-py3-none-any.whl (495 kB)
Downloading rasa-1.8.3-py3-none-any.whl (483 kB)
Downloading rasa-1.8.2-py3-none-any.whl (483 kB)
Downloading rasa-1.8.1-py3-none-any.whl (481 kB)
Downloading rasa-1.8.0-py3-none-any.whl (481 kB)
Downloading rasa-1.7.4-py3-none-any.whl (575 kB)
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Downloading slackclient-1.3.2.tar.gz (16 kB)
Downloading cloudpickle-1.2.2-py2.py3-none-any.whl (25 kB)
Downloading packaging-19.2-py2.py3-none-any.whl (30 kB)
Downloading colorhash-1.0.3-py3-none-any.whl (4.0 kB)
Downloading pika-1.0.1-py2.py3-none-any.whl (148 kB)
Downloading python_socketio-5.0.4-py2.py3-none-any.whl (52 kB)
Downloading sklearn_crfsuite-0.3.6-py2.py3-none-any.whl (12 kB)
Downloading aiohttp-3.7.3-cp39-cp39-win_amd64.whl (633 kB)
Downloading gym-0.15.4.tar.gz (1.6 MB)
Downloading gevent-1.5.0.tar.gz (5.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
  Preparing wheel metadata: started
  Preparing wheel metadata: finished with status 'done'
Downloading sanic-jwt-1.6.0.tar.gz (19 kB)
Downloading tensorflow_probability-0.7.0-py2.py3-none-any.whl (981 kB)
Downloading gast-0.2.2.tar.gz (10 kB)
Downloading twilio-6.51.0.tar.gz (457 kB)
Downloading matplotlib-3.3.3-cp39-cp39-win_amd64.whl (8.5 MB)
Downloading scikit-learn-0.20.4.tar.gz (11.7 MB)
Downloading python_engineio-4.0.0-py2.py3-none-any.whl (50 kB)
Downloading redis-3.3.11-py2.py3-none-any.whl (66 kB)
Downloading prompt_toolkit-2.0.10-py3-none-any.whl (340 kB)
Downloading mattermostwrapper-2.2.tar.gz (2.5 kB)
Downloading tqdm-4.56.0-py2.py3-none-any.whl (72 kB)
Downloading webexteamssdk-1.6-py3-none-any.whl (113 kB)
Downloading Sanic_Cors-0.9.9.post1-py2.py3-none-any.whl (16 kB)
Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Downloading tensor2tensor-1.14.1-py2.py3-none-any.whl (1.6 MB)
Downloading sanic-19.9.0-py3-none-any.whl (73 kB)
Downloading APScheduler-3.7.0-py2.py3-none-any.whl (59 kB)
Downloading jsonpickle-1.5.0-py2.py3-none-any.whl (36 kB)
Downloading scipy-1.6.0-cp39-cp39-win_amd64.whl (32.7 MB)
Downloading python_telegram_bot-11.1.0-py2.py3-none-any.whl (326 kB)

Downloading multidict-4.6.1.tar.gz (115 kB)
Downloading rasa_sdk-1.7.0-py3-none-any.whl (37 kB)
Downloading rasa_sdk-1.6.1-py2.py3-none-any.whl (32 kB)
Downloading rasa_sdk-1.5.2-py2.py3-none-any.whl (32 kB)
Downloading rasa_sdk-1.4.0-py2.py3-none-any.whl (32 kB)
Downloading questionary-1.9.0-py3-none-any.whl (32 kB)
Downloading jsonschema-2.6.0-py2.py3-none-any.whl (39 kB)

Downloading rasa-1.7.3-py3-none-any.whl (575 kB)
Downloading rasa-1.7.2-py3-none-any.whl (575 kB)
Downloading rasa-1.7.1-py3-none-any.whl (574 kB)
Downloading rasa-1.7.0-py3-none-any.whl (573 kB)
Downloading rasa-1.6.2-py3-none-any.whl (559 kB)

Downloading rasa-1.6.1-py3-none-any.whl (559 kB)

Downloading rasa-1.6.0-py3-none-any.whl (558 kB)
Downloading rasa-1.5.3-py3-none-any.whl (530 kB)


Downloading rasa-1.5.2-py3-none-any.whl (529 kB)
Downloading rasa-1.5.1-py3-none-any.whl (529 kB)
Downloading rasa-1.5.0-py3-none-any.whl (527 kB)
Downloading rasa-1.4.6-py3-none-any.whl (518 kB)

Downloading rasa-1.4.5-py3-none-any.whl (517 kB)
Downloading rasa-1.4.4-py3-none-any.whl (517 kB)
Downloading rasa-1.4.3-py3-none-any.whl (518 kB)

Using cached absl_py-0.11.0-py3-none-any.whl (127 kB)
Downloading networkx-2.3.zip (1.7 MB)
Downloading simplejson-3.17.2.tar.gz (83 kB)
Downloading Sanic_Cors-0.9.9.post4-py2.py3-none-any.whl (16 kB)
Downloading pymongo-3.11.2-cp39-cp39-win_amd64.whl (383 kB)
Downloading sanic-19.3.1-py3-none-any.whl (60 kB)
Downloading fakeredis-1.4.5-py3-none-any.whl (35 kB)
Downloading rasa_sdk-1.3.3-py2.py3-none-any.whl (32 kB)
Downloading urllib3-1.24.3-py2.py3-none-any.whl (118 kB)
Downloading rasa_sdk-1.0.0-py2.py3-none-any.whl (22 kB)

Downloading rasa-1.4.2-py3-none-any.whl (516 kB)
Downloading rasa-1.4.1-py3-none-any.whl (516 kB)
Downloading rasa-1.4.0-py3-none-any.whl (515 kB)
Downloading rasa-1.3.10-py3-none-any.whl (507 kB)
Downloading rasa-1.3.9-py3-none-any.whl (506 kB)
Downloading rasa-1.3.8-py3-none-any.whl (505 kB)
Downloading rasa-1.3.7-py3-none-any.whl (505 kB)
Downloading rasa-1.3.6-py3-none-any.whl (505 kB)
Downloading rasa-1.3.4-py3-none-any.whl (504 kB)
Downloading rasa-1.3.3-py3-none-any.whl (503 kB)
Downloading rasa-1.3.2-py3-none-any.whl (502 kB)
Downloading rasa-1.3.1-py3-none-any.whl (502 kB)
Downloading rasa-1.3.0-py3-none-any.whl (502 kB)
Downloading rasa-1.2.12-py3-none-any.whl (471 kB)
Downloading rasa-1.2.11-py3-none-any.whl (471 kB)
Downloading rasa-1.2.10-py3-none-any.whl (471 kB)
Downloading rasa-1.2.9-py3-none-any.whl (471 kB)
Downloading rasa-1.2.8-py3-none-any.whl (471 kB)
Downloading rasa-1.2.7-py3-none-any.whl (471 kB)
Downloading rasa-1.2.6-py3-none-any.whl (470 kB)
Downloading rasa-1.2.5-py3-none-any.whl (470 kB)
Downloading rasa-1.2.4-py3-none-any.whl (469 kB)
Downloading rasa-1.2.3-py3-none-any.whl (469 kB)
Downloading rasa-1.2.2-py3-none-any.whl (468 kB)
Downloading rasa-1.2.1-py3-none-any.whl (468 kB)
Downloading rasa-1.2.0-py3-none-any.whl (468 kB)
Downloading rasa-1.1.8-py3-none-any.whl (464 kB)
Downloading rasa-1.1.7-py3-none-any.whl (455 kB)
Downloading rasa-1.1.6-py3-none-any.whl (453 kB)
Downloading rasa-1.1.5-py3-none-any.whl (452 kB)
Downloading rasa-1.1.4-py3-none-any.whl (447 kB)
Downloading rasa-1.1.3-py3-none-any.whl (446 kB)
Downloading rasa-1.1.2-py3-none-any.whl (444 kB)
Downloading rasa-1.1.1-py3-none-any.whl (444 kB)
Downloading rasa-1.1.0-py3-none-any.whl (444 kB)
Downloading rasa-1.0.9-py3-none-any.whl (440 kB)
Downloading rasa-1.0.8-py3-none-any.whl (440 kB)
Downloading rasa-1.0.7-py3-none-any.whl (439 kB)
Downloading rasa-1.0.6-py3-none-any.whl (438 kB)
Downloading rasa-1.0.5-py3-none-any.whl (438 kB)
Downloading rasa-1.0.4-py3-none-any.whl (438 kB)
Downloading rasa-1.0.3-py3-none-any.whl (438 kB)
Downloading rasa-1.0.2-py3-none-any.whl (438 kB)
Downloading rasa-1.0.1-py3-none-any.whl (436 kB)
Downloading rasa-1.0.0-py3-none-any.whl (436 kB)
Downloading rasa-0.1.1-py3-none-any.whl (6.1 kB)
Downloading rasa_core-0.14.5-py3-none-any.whl (212 kB)
Downloading rasa_nlu-0.15.1-py3-none-any.whl (147 kB)
Downloading networkx-2.5-py3-none-any.whl (1.6 MB)
Downloading redis-2.10.6-py2.py3-none-any.whl (64 kB)
Downloading Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
Downloading fbmessenger-5.6.0-py2.py3-none-any.whl (11 kB)
Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Downloading Flask-JWT-Simple-0.0.3.tar.gz (6.9 kB)
Downloading pika-0.12.0-py2.py3-none-any.whl (108 kB)
Downloading fakeredis-0.10.3-py2.py3-none-any.whl (27 kB)
Downloading rasa_core_sdk-0.13.1-py2.py3-none-any.whl (20 kB)
Downloading Keras_Applications-1.0.6-py2.py3-none-any.whl (44 kB)
INFO: pip is looking at multiple versions of rasa to determine which version is compatible with other requirements. This could take a while.
Downloading rasa_core-0.14.4-py3-none-any.whl (212 kB)
Downloading rasa_core-0.12.3-py2.py3-none-any.whl (204 kB)
...
Downloading rasa_core-0.8.6-py2.py3-none-any.whl (103 kB)
Downloading rasa_core-0.7.0.tar.gz (60 kB)
Downloading pykwalify-1.6.0-py2.py3-none-any.whl (38 kB)
Downloading ConfigArgParse-0.13.0.tar.gz (31 kB)
Downloading PyYAML-3.13.tar.gz (270 kB)
Downloading scikit-learn-0.19.2.tar.gz (9.7 MB)
Downloading pika-0.11.2-py2.py3-none-any.whl (107 kB)
Downloading python_telegram_bot-10.1.0-py2.py3-none-any.whl (298 kB)
Downloading prompt_toolkit-1.0.14-py3-none-any.whl (248 kB)
Downloading python_engineio-3.14.2-py2.py3-none-any.whl (51 kB)
Downloading future-0.18.2.tar.gz (829 kB)
Downloading jsonpickle-0.9.6.tar.gz (67 kB)
Downloading PyInquirer-1.0.3.tar.gz (27 kB)
Downloading graphviz-0.9-py2.py3-none-any.whl (16 kB)
Downloading graphviz-0.8.4-py2.py3-none-any.whl (16 kB)
Downloading Keras-2.4.3-py2.py3-none-any.whl (36 kB)
Downloading rasa_core_sdk-0.11.5-py2.py3-none-any.whl (14 kB)
Downloading rasa_nlu-0.11.5.tar.gz (55 kB)
Downloading pandoc-1.0.2.tar.gz (488 kB)
Downloading graphviz-0.16-py2.py3-none-any.whl (19 kB)
Downloading python_telegram_bot-13.1-py3-none-any.whl (422 kB)
Downloading slackclient-2.9.3-py2.py3-none-any.whl (96 kB)
Downloading rasa_core-0.8.5.tar.gz (76 kB)
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Downloading redis-3.5.3-py2.py3-none-any.whl (72 kB)
Downloading nbsphinx-0.8.1-py3-none-any.whl (24 kB)
Downloading typing-3.7.4.3.tar.gz (78 kB)
Downloading rasa-0.1.0-py3-none-any.whl (6.1 kB)
Downloading rasa-0.0.5.tar.gz (5.5 kB)
Downloading rasa-0.0.4.tar.gz (5.0 kB)
Downloading rasa-0.0.3.tar.gz (4.7 kB)
Downloading rasa-0.0.2.tar.gz (3.9 kB)
Downloading rasa-0.0.1.tar.gz (1.6 kB)
Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Requirement already satisfied: certifi>=2017.4.17 in e:\anaconda3\envs\rasa\lib\site-packages (from requests < 3.0,>=2.23->rasa->-r C:\Users\ashish\Desktop\code\condaenv.fjji_o0b.requirements.txt (line 1)) (2020.12.5)
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: rasa
Building wheel for rasa (setup.py): started
Building wheel for rasa (setup.py): finished with status 'done'
Created wheel for rasa: filename=rasa-0.0.5-py3-none-any.whl size=6115 sha256=21f60ab11f975e9f4855f730b54d316cac6d4864420dd62e945dfc6091330085
Stored in directory: c:\users\ashish\appdata\local\pip\cache\wheels\16\9b\e5\589820b8a86bcf14b1020a72bab300d7f853c133075a6f3d72
Successfully built rasa
Installing collected packages: urllib3, idna, chardet, requests, rasa
Successfully installed chardet-4.0.0 idna-2.10 rasa-0.0.5 requests-2.25.1 urllib3-1.26.2

done
#
# To activate this environment, use
#
#     $ conda activate rasa
#
# To deactivate an active environment, use
#
#     $ conda deactivate 

TESTING:::::

(base) C:\Users\ashish\Desktop\code>conda activate rasa

(rasa) C:\Users\ashish\Desktop\code>pip show rasa-nlu
WARNING: Package(s) not found: rasa-nlu

(rasa) C:\Users\ashish\Desktop\code>pip show rasa_nlu
WARNING: Package(s) not found: rasa_nlu

(rasa) C:\Users\ashish\Desktop\code>pip show rasa-core
WARNING: Package(s) not found: rasa-core

(rasa) C:\Users\ashish\Desktop\code>pip show rasa_core
WARNING: Package(s) not found: rasa_core

(rasa) C:\Users\ashish\Desktop\code>pip show rasa
Name: rasa
Version: 0.0.5
Summary: A wrapper Cisco ASA REST API
Home-page: http://networklore.com/rasa/
Author: Patrick Ogenstad
Author-email: patrick@ogenstad.com
License: Apache
Location: e:\anaconda3\envs\rasa\lib\site-packages
Requires: requests
Required-by:

The Cisco ASA is a security device that combines firewall, antivirus, intrusion prevention, and virtual private network (VPN) capabilities. It provides proactive threat defense that stops attacks before they spread through the network.

This is not what we were looking for. RASA is a chatbot framework.

Another failure while trying out RASA installation using "pip3".
The error we get is: "ModuleNotFoundError: No module named 'pypandoc'"
This error is fixed by using the Python version 3.8 as said in RASA Installation Docs. Our version of Python was 3.9.

(base) C:\Users\ashish>conda create -n myenv python

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

## Package Plan ##

environment location: e:\Anaconda3\envs\myenv

added / updated specs:
  - python


The following packages will be downloaded:

  package                    |            build
  ---------------------------|-----------------
  ca-certificates-2021.1.19  |       haa95532_0         122 KB
  certifi-2020.12.5          |   py39haa95532_0         141 KB
  openssl-1.1.1i             |       h2bbff1b_0         4.8 MB
  pip-20.3.3                 |   py39haa95532_0         1.8 MB
  python-3.9.1               |       h6244533_2        16.4 MB
  setuptools-52.0.0          |   py39haa95532_0         725 KB
  tzdata-2020f               |       h52ac0ba_0         113 KB
  vc-14.2                    |       h21ff451_1           8 KB
  vs2015_runtime-14.27.29016 |       h5e58377_2        1007 KB
  wheel-0.36.2               |     pyhd3eb1b0_0          33 KB
  wincertstore-0.2           |   py39h2bbff1b_0          15 KB
  ------------------------------------------------------------
                                         Total:        25.1 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-py39haa95532_0
openssl            pkgs/main/win-64::openssl-1.1.1i-h2bbff1b_0
pip                pkgs/main/win-64::pip-20.3.3-py39haa95532_0
python             pkgs/main/win-64::python-3.9.1-h6244533_2
setuptools         pkgs/main/win-64::setuptools-52.0.0-py39haa95532_0
sqlite             pkgs/main/win-64::sqlite-3.33.0-h2a8f88b_0
tzdata             pkgs/main/noarch::tzdata-2020f-h52ac0ba_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-py39h2bbff1b_0
zlib               pkgs/main/win-64::zlib-1.2.11-h62dcd97_4

Proceed ([y]/n)? y 

(base) C:\Users\ashish>conda activate myenv 

(myenv) C:\Users\ashish>pip3 install rasa
Collecting rasa
Using cached rasa-1.10.2-py3-none-any.whl (510 kB)
...
Using cached rasa-1.6.1-py3-none-any.whl (559 kB)
Requirement already satisfied: setuptools>=41.0.0 in e:\anaconda3\envs\myenv\lib\site-packages (from rasa) (52.0.0.post20210125)
Using cached rasa-1.6.0-py3-none-any.whl (558 kB)
...
Using cached rasa-0.1.1-py3-none-any.whl (6.1 kB)
Collecting rasa-core
Using cached rasa_core-0.14.5-py3-none-any.whl (212 kB)
...
Using cached rasa_core-0.7.9.tar.gz (61 kB)
  ERROR: Command errored out with exit status 1:
   command: 'e:\Anaconda3\envs\myenv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ashish\\AppData\\Local\\Temp\\pip-install-ah9j5xnw\\rasa-core_5c8978c463de41d99df016553e2821a4\\setup.py'"'"'; __file__='"'"'C:\\Users\\ashish\\AppData\\Local\\Temp\\pip-install-ah9j5xnw\\rasa-core_5c8978c463de41d99df016553e2821a4\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ashish\AppData\Local\Temp\pip-pip-egg-info-98hq0mod'
       cwd: C:\Users\ashish\AppData\Local\Temp\pip-install-ah9j5xnw\rasa-core_5c8978c463de41d99df016553e2821a4\
  Complete output (14 lines):
  Traceback (most recent call last):
    File "C:\Users\ashish\AppData\Local\Temp\pip-install-ah9j5xnw\rasa-core_5c8978c463de41d99df016553e2821a4\setup.py", line 9, in module
      import pypandoc
  ModuleNotFoundError: No module named 'pypandoc'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "string", line 1, in module
    File "C:\Users\ashish\AppData\Local\Temp\pip-install-ah9j5xnw\rasa-core_5c8978c463de41d99df016553e2821a4\setup.py", line 12, in module
      readme = open('README.md').read()
    File "e:\Anaconda3\envs\myenv\lib\encodings\cp1252.py", line 23, in decode
      return codecs.charmap_decode(input,self.errors,decoding_table)[0]
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 882: character maps to undefined
  ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

(myenv) C:\Users\ashish> 

Error is due to not using correct version of Python to work with RASA:

(erasa) C:\Users\ashish\Desktop\code>python
Python 3.9.1 (default, Dec 11 2020, 09:29:25) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

WE NEED A LOWER VERSION OF PYTHON:

Dated: 26-Jan-2021
You can install Rasa Open Source using pip (requires Python 3.6, 3.7 or 3.8).

According to this link: RASA Docs  

For Installation of RASA on Windows, you need "Microsoft Visual C++ 14.0 is required. Get it with 'Build Tools for Visual Studio'". 

running build_ext
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for Twisted
  ERROR: Command errored out with exit status 1:
  command: 'e:\Anaconda3\envs\erasa3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ashish\\AppData\\Local\\Temp\\pip-install-fpvqt_cw\\twisted_d52b02a3aff44d87b026985a9469039a\\setup.py'"'"'; __file__='"'"'C:\\Users\\ashish\\AppData\\Local\\Temp\\pip-install-fpvqt_cw\\twisted_d52b02a3aff44d87b026985a9469039a\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ashish\AppData\Local\Temp\pip-record-exf7fho7\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\Anaconda3\envs\erasa3\Include\Twisted'
      cwd: C:\Users\ashish\AppData\Local\Temp\pip-install-fpvqt_cw\twisted_d52b02a3aff44d87b026985a9469039a\ 
Check the logs for full command output.

failed
CondaEnvException: Pip failed  
Tags: Technology,Natural Language Processing,Anaconda,Machine Learning,Python,