Getting rasa: command not found despite having installed rasa - python

I'm trying to run rasa on an ubuntu system (recently updated to latest LTS version). I made a virtual environment with anaconda, installed pip and then rasa as shown in the documentation. However, I keep getting rasa: command not found when I tried running 'rasa init'
I followed the steps given on other similiar post:
o I uninstalled and reinstalled rasa
o My first installation was with pip3, the second with pip
o The second time, I opened the directory I wanted to work in, using cd, and installed there, and also ran 'pip3 install -U pip'
o I tried running 'rasa init --no-prompt' instead of 'rasa init' and got the same error
o I tried 'pip show rasa' ,and got
Name: rasa
Version: 0.0.5
...
o I tried 'pip list command' and rasa 0.0.5 was visible there
My installation came as successful, but I had this error:
INFO: pip is looking at multiple versions of rasa to determine which version is compatible with other requirements. This could take a while.
Collecting rasa
Using cached rasa-0.1.0-py3-none-any.whl (6.1 kB)
Using cached rasa-0.0.5-py3-none-any.whl
Using cached rasa-0.0.4.tar.gz (5.0 kB)
Using cached rasa-0.0.3.tar.gz (4.7 kB)
ERROR: Command errored out with exit status 1:
command: /home/anaconda3/envs/rasa-env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nwwpljd_/rasa_c501d56996fa4242826f449fb9efb8bc/setup.py'"'"'; file='"'"'/tmp/pip-install-nwwpljd_/rasa_c501d56996fa4242826f449fb9efb8bc/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 /tmp/pip-pip-egg-info-oo59li03
cwd: /tmp/pip-install-nwwpljd_/rasa_c501d56996fa4242826f449fb9efb8bc/
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-nwwpljd_/rasa_c501d56996fa4242826f449fb9efb8bc/setup.py", line 14, in
with open('HISTORY.rst', 'r', 'utf-8') as f:
File "/home/anaconda3/envs/rasa-env/lib/python3.9/codecs.py", line 905, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'HISTORY.rst'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/77/56/5d44415d54043fb441b910bf86fa36bbb3b5565a507ba4ea933117cf109f/rasa-0.0.3.tar.gz#sha256=409e502bc20a29db848b68766decacad15a9cbeb68d1afd90add9945945c9048 (from https://pypi.org/simple/rasa/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached rasa-0.0.2.tar.gz (3.9 kB)
Using cached rasa-0.0.1.tar.gz (1.6 kB)*
But after that, finally, it came as installation successful.
Please help me
Edit: - I have found out on the rasa forum that the problem was that my version of python was incompatible with Rasa. Problem solved!

Related

Error while installing flask-mysqldb on ubuntu 20.04

I am building a flask project and I want to use MySQL database. I need flask-mysqldb as an ORM for that. So as a good practice, I created a virtual environment, install flask and other dependencies, and then for installing flask-mysqldb, I used pip install flask-mysqldb. This suddenly gives me bunch of errors. At first I realized, I dont have MySQL installed on my system. So even after installing it these errors won't go away. I also tried pip install Flask-MySQLdb don't know how this is different from the first command but same errors.
I tried searching for errors online regarding flask-mysqldb, but most of them relate to some mysql.h file error which doesn't show in my terminal logs.
(env) ck#ck-IdeaPad-Gaming-3-15ARH05:~/projects/opensoft/roomAlloc$ pip install Flask-MySQLdb
Collecting Flask-MySQLdb
Using cached Flask-MySQLdb-0.2.0.tar.gz (2.1 kB)
Requirement already satisfied: Flask>=0.10 in ./env/lib/python3.8/site-packages (from Flask-MySQLdb) (2.0.2)
Collecting mysqlclient
Using cached mysqlclient-2.1.0.tar.gz (87 kB)
ERROR: Command errored out with exit status 1:
command: /home/ck/projects/opensoft/roomAlloc/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bra67idg/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bra67idg/mysqlclient/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 /tmp/pip-install-bra67idg/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-bra67idg/mysqlclient/
Complete output (15 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-bra67idg/mysqlclient/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-bra67idg/mysqlclient/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-bra67idg/mysqlclient/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Please help me out, you can comment if you need more information.
I had the same error 2 minutes ago and find this command to solve the problem!
sudo apt-get install libmysqlclient-dev
the just try to install again and should work fine.
Credits:
I found this command here (In Spanish):
https://programmerclick.com/article/1483761552/

Mac M1 Can't Install PyAudio / Tried All Answers Suggested in StackOverflow [duplicate]

This question already has answers here:
Unable to install PyAudio on M1 Mac [PortAudio already installed]
(8 answers)
Closed 1 year ago.
This post was edited and submitted for review 1 year ago and failed to reopen the post:
Original close reason(s) were not resolved
Mac M1 Can't Install PyAudio | Need Microphone for Google Speech Recognition:
Please note below I have outlined answers that have seemed to work for others that have not worked for me.
Below is the error code:
WARNING: Discarding https://files.pythonhosted.org/packages/d0/dc/ffb9ce5e3f19bd289902915a9f68b7d199216065f8ea17d5b5e8e4ad86ee/PyAudio-0.2.9.tar.gz#sha256=bfd694272b3d1efc51726d0c27650b3c3ba1345f7f8fdada7e86c9751ce0f2a1 (from https://pypi.org/simple/pyaudio/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pyaudio-0.2.8.tar.gz (235 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/lw/_gcm85s107z9sbgqyrw5pw700000gn/T/pip-install-p8wmnhcz/pyaudio_38ac896d11214f37bec552d23eaf6dfc/setup.py'"'"'; file='"'"'/private/var/folders/lw/_gcm85s107z9sbgqyrw5pw700000gn/T/pip-install-p8wmnhcz/pyaudio_38ac896d11214f37bec552d23eaf6dfc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/lw/_gcm85s107z9sbgqyrw5pw700000gn/T/pip-pip-egg-info-nt0b4dbj
cwd: /private/var/folders/lw/_gcm85s107z9sbgqyrw5pw700000gn/T/pip-install-p8wmnhcz/pyaudio_38ac896d11214f37bec552d23eaf6dfc/
Complete output (15 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/lw/_gcm85s107z9sbgqyrw5pw700000gn/T/pip-install-p8wmnhcz/pyaudio_38ac896d11214f37bec552d23eaf6dfc/setup.py", line 124, in
setup(name = 'PyAudio',
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/dist.py", line 776, in parse_config_files
self._parse_config_files(filenames=filenames)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/dist.py", line 648, in _parse_config_files
parser.read_file(reader)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/configparser.py", line 719, in read_file
self._read(f, source)
WARNING: Discarding https://files.pythonhosted.org/packages/06/d1/3d202c9187fb78ad6d4f8b476a8cc0ded7c1b47ca33d5dab73b959faf123/pyaudio-0.2.8.tar.gz#sha256=4f85367cf79657616684487037957ac38582ecc5389b89420fe61d901b719551 (from https://pypi.org/simple/pyaudio/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pyaudio (from versions: 0.2.8, 0.2.9, 0.2.10, 0.2.11)
ERROR: No matching distribution found for pyaudio
WARNING: You are using pip version 21.3; however, version 21.3.1 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --upgrade pip' command.
Please note what was attempted through answers on stackoverflow and other-sites that has not worked for me.
brew update
brew install portaudio
brew link --overwrite portaudio
pip install pyaudio
##Use the command to install PortAudio
sudo brew install portaudio
##After successful installation of PortAudio, enter the following command.
sudo nano $HOME/.pydistutils.cfg
##Next, enter the following lines in the opened window
[build_ext]
include_dirs=/Users//homebrew/Cellar/portaudio/19.20140130/include/
include_dirs=/Users//homebrew/Cellar/portaudio/19.20140130/lib/
Finally run the command
pip install pyaudio
or
pip3 install pyaudio
Any help would be greatly appreciated. Thank you.
install brew on your M1 machine from here
How to install homebrew on M1 mac
And then enter this commands :
brew update
brew install portaudio
brew link --overwrite portaudio
pip install pyaudio
you can also check this :
Unable to install PyAudio on M1 Mac [PortAudio already installed]

Failed to build pypiwin32

Alright so what I've been trying to do the past hour is install the pywintypes lib and searched up that it was pypiwin32 instead but it doesn't work it fails to build additionally tried installing it manually by downloading the source and running setup.py but got same err: I get this error and I have python 3.10
Collecting pypiwin32
Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
Using cached pypiwin32-219.zip (4.8 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Rasmus\AppData\Local\Programs\Python\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Rasmus\\AppData\\Local\\Temp\\pip-install-3z4zmi2y\\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\\setup.py'"'"'; __file__='"'"'C:\\Users\\Rasmus\\AppData\\Local\\Temp\\pip-install-3z4zmi2y\\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Rasmus\AppData\Local\Temp\pip-pip-egg-info-6dg0frr7'
cwd: C:\Users\Rasmus\AppData\Local\Temp\pip-install-3z4zmi2y\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Rasmus\AppData\Local\Temp\pip-install-3z4zmi2y\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\setup.py", line 121
print "Building pywin32", pywin32_version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2b/ca/5c086c18de8f70222787b3e824e755b68d99272531522e77bb381d4f60c8/pypiwin32-219.zip#sha256=06d478295c89dbdd4187e1ac099bb8eab93c29e298bded4e2fbc77009287fa44 (from https://pypi.org/simple/pypiwin32/). Command errored out with exit status 1:
python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: none)
ERROR: No matching distribution found for pywin32>=223
the only solution I can see is to downgrade from python 3.10 down to 3.9
pywin32 version 302 (NOT pypiwin32, which looks like a mistake from 2018) was uploaded to PyPi on October 10, 2021, and states in the change log:
Support for Python 10, dropped support for Python 3.5 (3.5 security support
ended 13 Sep 2020)
Demo (using PyLauncher to update my 3.10 install):
C:\>py -3.10 -m pip install pywin32
Collecting pywin32
Downloading pywin32-302-cp310-cp310-win_amd64.whl (9.2 MB)
|████████████████████████████████| 9.2 MB 6.8 MB/s
Installing collected packages: pywin32
Successfully installed pywin32-302
Make sure to run the Scripts\pywin32_postinstall.py from an administrator command prompt as well to register it properly. Make sure it runs in the context of the 3.10 installation as well (again using PyLauncher):
C:\Python310\Scripts>py -3.10 pywin32_postinstall.py -install
Parsed arguments are: Namespace(install=True, remove=False, wait=None, silent=False, quiet=False, destination='C:\\Python310\\Lib\\site-packages')
Copied pythoncom310.dll to C:\windows\system32\pythoncom310.dll
Copied pywintypes310.dll to C:\windows\system32\pywintypes310.dll
Registered: Python.Interpreter
Registered: Python.Dictionary
Registered: Python
-> Software\Python\PythonCore\3.10\Help[None]=None
-> Software\Python\PythonCore\3.10\Help\Pythonwin Reference[None]='C:\\Python310\\Lib\\site-packages\\PyWin32.chm'
Registered help file
Pythonwin has been registered in context menu
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.

cloudant module will not install with pip

trying to install the cloudant module on a raspberry pi ver 1 rev b using the instructions from IBM's web page.
first: git clone https://github.com/IBM-Cloud/get-started-python
then: cd get-started-python
finally: pip install -r requirements.txt
I want to use the cloudant module with python 2.7 I've read about the environment variable possibly being an issue, but honestly i'm lost. I've read many posts about problems installing, but so far nothing works...
I get the following error message:
pi#rpi-2:~/hms/get-started-python $ pip install -r requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: Flask>=1.0.0 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 1)) (1.0.2)
Collecting cloudant==2.13.0
Using cached cloudant-2.13.0.tar.gz (60 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d8SSO0/cloudant/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d8SSO0/cloudant/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 /tmp/pip-pip-egg-info-7Btkkf
cwd: /tmp/pip-install-d8SSO0/cloudant/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-d8SSO0/cloudant/setup.py", line 33, in <module>
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
UPDATE:
so this is my code:
from cloudant.client import cloudant
running my code using python3 code.py I get the error message"
Traceback (most recent call last):
File "code.py", line 1, in <module>
from cloudant.client import cloudant
ModuleNotFoundError: No module named 'cloudant'
While I don't fully understand why changing my import statement to from cloudant import Cloundant fixes the issue...
Parameter encoding was added to open() in Python 3.0. This code in setup.py is Python3-only despite the packages declares compatibility with Python2. Please note they provide wheels only for Python3.
Either using encoding is a bug or declaring compatibility with Python2 is a bug. Which one is for the authors to decide. Report the problem and let's them to resolve.
Or try Python3.

How do I install scientificpython package successfully on Ubuntu 18.04?

I have installed Python 3.7.6 on my Ubuntu 18.04 system. I am trying to install package called "scientificpython" but consistently getting the following error message.
(base) jit#jit-VirtualBox:~$ pip install scientificpython
Collecting scientificpython
Using cached ScientificPython-2.9.4.tar.gz (688 kB)
ERROR: Command errored out with exit status 1:
command: /home/jit/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o8a8hyd1/scientificpython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o8a8hyd1/scientificpython/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 /tmp/pip-install-o8a8hyd1/scientificpython/pip-egg-info
cwd: /tmp/pip-install-o8a8hyd1/scientificpython/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-o8a8hyd1/scientificpython/setup.py", line 72
print "netCDF not found, the netCDF module will not be built!"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("netCDF not found, the netCDF module will not be built!")?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How do I resolve this problem?
Based on your traceback and the ScientificPython home page:
Therefore ScientificPython can be used only with Python 2.7 and NumPy 1.8, but not with later releases of either software.
You are using Python 3.7.6, which does not recognize print as a statement as it existed in Python 2, for starters.
You can install Python 2 from source, or use a tool such as pyenv to manage multiple Python versions alongside each other.
Try to install ScientificPython by specifying the version
Command:
pip install ScientificPython==2.9.4
Or Try:
python -m pip install ScientificPython==2.9.4
If problem still persist, then try to download the tar file of the package then install it manually. Available links are provided.
https://files.pythonhosted.org/packages/a2/8e/6306c88c0e937af38ed3a40e2a08caf30c53ad7f33e2928f14ae2cf53961/ScientificPython-2.9.4.tar.gz
Or
https://src.fedoraproject.org/lookaside/extras/ScientificPython/ScientificPython-2.8.1.tar.gz/
Or
https://osdn.net/frs/g_redir.php?m=kent&f=anuga%2Fanuga_support_software%2Fubuntu_8.10%2FScientificPython-2.9.0.tar.gz
But ScientificPython works only with Python version 2. So it is recommended to use the alternative package called Scipy.
Command:
pip install scipy
Or
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
I hope it would resolve the error.

Categories

Resources