Problem with tensorflow while downloading rasa_core - rasa-core

I’m trying to update the rasa bot source code from a friend of mine but I had a problem when trying to download rasa_core:
(cha_env) C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation>pip install rasa_core
Collecting rasa_core
...
Collecting tensorflow==1.10.0 (from rasa_core)
Could not find a version that satisfies the requirement tensorflow==1.10.0 (from rasa_core) (from versions: )
No matching distribution found for tensorflow==1.10.0 (from rasa_core)
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Do you have any idea ? Is it because of the requirements ?
I tried to install tensorflow according to this answer :
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
But I still have the same issue.

I remember seeing this issue when my colleague was installing it rasa_core. Try installing tensorflow separately then continue with rasa_core installation. It should solve the problem
pip install tensorflow
If you get No matching distribution found for tensorflow error try following:
Note: This works for 64 bit Windows for tensorflow version 1.12.0. For all the variants of tensorflow distribution please check https://storage.googleapis.com/tensorflow/
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.12.0-rc2.zip

Related

Tensorflow Pip Install Mac/Docker Python3

I am currently trying to install tensorflow inside of a Docker container or on my local Macbook. Both are not working and return the same result: ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow
I am using a normal pip install. Docker: RUN python3.8 -m pip install -r requirements.txt
Mac: pip3 install tensorflow
My pip versions are all up to date since I ran pip install --upgrade pip a lot of times so far and do it again with every new try.
I am not able to change the Python version in the Docker-Container since there are other packages which require Python 3.8 in the same Container.
I am happy for any Ideas to solve that problem other than updating pip oder installing another Python version since that is not possible for me.
My System is a Macbook Air 2020 M1.
I have now found the answer to my own question. The answer is postet in this Stackoverflow link: Tensorflow not found on pip install inside Docker Container using Mac M1
You need to change the platform to linux when running the docker command. docker build --platform linux/x86_64 -t myimage .

PyTorch dll issues for Caffe2

I am using a Windows 10 Machine and after re-installing Anaconda and all of the packages I had previously, including torchvision, torch and necessary dependencies, I am still getting this error:
OSError: [WinError 127] The specified procedure could not be found. Error loading "C:\Users\XXX\Anaconda3\envs\XXX\lib\site-packages\torch\lib\caffe2.dll" or one of its dependencies.
I am using python 3.7.9 and:
torchaudio=0.6.0=py37
torchvision=0.7.0=py37_cpu
tornado=6.0.4=py37he774522_1
traitlets=5.0.5=py_0
I've looked into it quite a bit but feel like this should be an easy solve...
I do not have CUDA and have used this:
conda install pytorch torchvision torchaudio cpuonly -c pytorch
as per instructed on the official website of pytorch
After a long time trying many things with Anaconda I decided to use bare python instead and I installed Python 3.8.6 and installed PyTorch from the link you provided and it finally worked even with CUDA support. Make sure to completely remove all Anaconda/Other Python version scripts from your path to ensure only the 3.8.6 version is used by your prompt.
I had the same problem, so I uninstalled the pytorch in my machine using
"conda uninstall pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch"
Then did a clean installation using the following
"pip install torch===1.7.0 torchvision===0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html"
I did not use conda for installation as it was persistently giving me the cpu version of pytorch.
I tried to install PyTorch with Anaconda and had the same error.
For me what solved the issue was to uninstall Pytorch using Pip (even though I installed it with conda) and then installing again with Pip as explains at PyTorch guide.
Uninstall:
pip uninstall torch
pip uninstall torchvision
pip uninstall torchaudio
Install:
pip3 install torch torchvision torchaudio

How can I install torch and torchvision with pip and python 3.8.3 on windows in an virtual environment?

I created a virtual environment for my project and I'm trying to install torch via pip.
pip install torch===1.5.1 torchvision===0.6.1 -f https://download.pytorch.org/whl/torch_stable.html
This gives me the error -
ERROR: Could not find a version that satisfies the requirement torch===1.5.1 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch===1.5.1
Some solutions recommend the use of conda, is it necessary? Can I not do it through just pip
You can try to install directly from the wheels files:
pip install https://download.pytorch.org/whl/cu102/torch-1.5.1-cp36-cp36m-win_amd64.whl
pip install https://download.pytorch.org/whl/cu102/torchvision-0.6.1-cp36-cp36m-win_amd64.whl

Trouble using PIP Install

Having trouble installing any packages or upgrading through PIP install. basically i want to install packages for Data Science. Not able to use CONDA either.
Error I got-
ERROR: Could not find a version that satisfies the requirement menuinst (from conda) (from versions: none)
ERROR: No matching distribution found for menuinst (from conda)
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Unable to install coremltools

I am trying to convert a pb file to a coreml file. to do this i need to install coremltools. However, when i try to install it by pip it comes up with this error :
ERROR: Could not find a version that satisfies the requirement coremltools (from versions: none)
ERROR: No matching distribution found for coremltools
i have tried to install it in a python 2.7 environment, still no joy
pip install coremltools
Collecting coremltools
ERROR: Could not find a version that satisfies the requirement coremltools (from versions: none)
ERROR: No matching distribution found for coremltools
Rorys-MBP:~ roryhodgson$
The only reason I could found out that explains why this is happening is that coremltools require python 2.7, make sure you are running it pip --version. If you just typed pip install coremltools the chances are that your machine (assuming it is running macOS) pip command is running the default version of macOS python which probably is 3.5.2 or greater.
I could fix this issue by creating an environment in which my python version was 2.7:
pip install virtualenv
Create a virtual environment:
virtualenv --python=/usr/bin/python2.7 py27
Activate it:
source py27/bin/activate
Lastly, install coremltools:
pip install -U coremltools
When you are done just deactivate the environment running deactivate in the terminal and that's it.
All this is available at the following source: satoshi.blogs.com
If you install from GitHub, then you will not need to install Python 2.7 or fiddle with virtual environments.
pip install "git+https://github.com/apple/coremltools"
The code above will let you install coremltools by cloning the Git repository.

Resources