Unable to run Rasa - python-3.x

I have been trying to install and use Rasa for one of my Assignment for 2 days. I have tried everything. I have tried using it with python 3.9, python 3.7.x and currently I have installed python 3.6.8 for which the error message is shown below. I have tried to find the solution via github discuss sections, but nothing has helped me yet. Can anyone tell me how can I resolve this?
Installed versions:
Rasa Version Installed: 2.3
Python version 3.6.8
Pip version 18.1
tensorflow version 2.3.1

The install steps can be found here along with the supported Python versions. 3.9 is not supported.
This is a TensorFlow loading issue which is probably related to your system configuration. There is more information here

I faced this problem and solved it by installing tensorflow using conda.
Another way can be using virtual environment.

Related

Importing Tensorflow on Python 3.6, 3.7, 3.8

I have a problem with importing TensorFlow. I have tried multiple versions of Numpy, Python, and TensorFlow and I still get the following error:
struct_pb2.TypeSpecProto.NDARRAY_SPEC
AttributeError: NDARRAY_SPEC
I have tried using conda and pip for installation and neither one works. I have no idea what might be the cause of this problem and it started happening about a week ago before that TensorFlow was working fine!
I believe you are using windows, and you have an incompatible version of tensorflow installed or you are missing a dependency. First make sure you have the following installed correct version of Visual C++ installed for your version of windows.
https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
https://aka.ms/vs/16/release/vc_redist.x64.exe here is the direct link.
If it still doesn't work, enable longpaths,
https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
If you are having a clash with other packages, create a new conda environment first if you haven't already, and install tensorflow like this.
conda create -n tfenv
conda activate tfenv
conda install tensorflow
Then try to import tensorflow as tf again.

How to update OpenCV 3.4.2 to OpenCV 4 or latest stable version?

I have installed OpenCV 3.4.2 successfully by following the tutorial given here:
https://www.pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/
Now, I would like to update to openCV 4 or the latest stable version.
Do I need to uninstall 3.4.2 first?
If so, how should I uninstall it.
I am afraid to creating another virtual environment and installing version 4 or master package from github by following the same steps might create conflicts. Please advice.
Working on Ubuntu 16.04 LTS, python 3.5
For Python interface, I guess you can try something like pip install opencv-python==4.0.0.21. Note, you might need to run pip3 install opencv-python==4.0.0.21 depending upon your pip version.

Issues while installing tensorflow for Python 3.7 in Mac

I am using macOS Sierra(on GPU support) with python3.7.0 installed.
Whenever I am trying to install tensorflow with the following command,
pip3 install tensorflow
I am getting the following issues:
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow.
Any help or suggestions are welcome.
Tensorflow does not support Python 3.7 yet. Use Python 3.6. See https://github.com/tensorflow/tensorflow/issues/17022.

Does TensorFlow 1.9 support Python 3.7

I'm hesitating whether to downgrade to Python 3.6 or install a new version of TensorFlow.
Does TensorFlow 1.9 support Python 3.7?
I was able to install Tensorflow 1.12.0 with Python 3.7 on MacOS, with the following command.
sudo python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
Not yet. It seems there are some variables named "async", which has become a keyword in 3.7. Shouldn't be too difficult to fix, but still a problem.
Source: https://github.com/tensorflow/tensorflow/issues/20444
Probably not yet.
First of all, you will probably get a SyntaxError: invalid syntax because some parameters and variables at the pywrap_tensorflow_internal.py module have the name async which is a reserved keyword in Python 3.7.0 (see also this post).
However, you can solve this by simply changing the name of all these (Ctrl + R and Replace All) from async to for example async1.
The problem is that then you will probably get a ImportError: No module named '_pywrap_tensorflow_internal' which perhaps may be fixed for any previous version before Python 3.7.0 as this post on StackOverflow suggests but personally I could not fix it on my laptop with Python 3.7.0 .
Consequently, I simply downgraded to Python 3.6.6 and now Tensorflow is working fine.
There is a whl built here. However in my run it was cpu version.
https://www.lfd.uci.edu/~gohlke/pythonlibs/
as of Aug 26tH, there is an update on the tensorflow github site
https://github.com/tensorflow/tensorflow/pull/21202
Tensorflow 1.13.1 now supports Python 3.7.
According to the comments on github
see
https://github.com/tensorflow/tensorflow/issues/20517#issuecomment-457185528
by member av8ramit
"We are aiming to try and have Windows and Ubuntu python binaries by rc2 or the official."
the estimated release date for 2019-02-03
however on
https://github.com/winpython/winpython/issues/687
one can read from a winpython contributor:
"Tensorflow-2 is 2019, Tensorflow-1 on Python-3.7 is still not in sight"
Finally Worked for me!
On Python 3.6.4 (even 3.6.5 failed for me)
Install Python3.6.4 from here:
https://www.python.org/downloads/mac-osx/
If you're facing issues with Python pkgs that you already had on you older version just revert it using this post:
python location on mac osx
I found this to work after searching for a while.
As Tensorflow only supports Python 3.6 as of now, you can install a different version of python alongside your standard one. Here are the steps I followed:
Download the Python3.6 tgz file from the official website (eg. Python-3.6.6.tgz)
Unpack it with tar -xvzf Python-3.6.6.tgz
cd Python-3.6.6
run ./configure
run make altinstall to install it (install vs altinstall explanation here Difference in details between "make install" and "make altinstall")
You'll normally find your new python install under /usr/local/bin. Now you can create a new virtualenv specifying the python version with:
virtualenv --python=python3.6 env3.6
Get into the virtualenv running the command source env3.6/source/bin/activate.
Install tensorflow with the classic pip install tensorflow
Profit
First of all,
*conda create -n yourenvname python=3.6
*conda activate yourenvname
*pip install tensorflow
then it will work like rock.

Tensor flow package installation in PyCharm

I have been successfully using PyCharm for my python work.All the packages can be easily installed by going to settings and then project interpreter but tensorflow installation is showing error.In suggestions it asked me to upgrade pip module.But even after that it shows error with following message:
" Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow"
I am able to install all other packages but error is with tensorflow only.I am using windows.
Please run pip install tensorflow in command line and post the output here. Tensorflow can be installed on Windows but the process is often annoying.
You could also tried anaconda. It is has very nice UI and you could switch between different version.

Resources