tensorflow installation issue using anaconda - tensorflow

I am trying to install tensorflow using anaconda but followed the following approach and failed.
C:\>activate tensorflow
(tensorflow) C:\>conda create -n tensorflow
CondaValueError: Value error: prefix already exists: C:\Users\pirates\Anaconda3\
envs\tensorflow
(tensorflow) C:\>pip install --ignore-installed --upgrade https://storage.google
apis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
tensorflow-1.1.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platf
orm.
(tensorflow) C:\>
I am not able to install tensorflow with conda command .. what do I do?
I had installed anaconda 1.5 for python 3.6.0
Please somebody help with this. Thanks in advance.

It sounds to my as a python version incompatibility ,try to install python 3.5 and then run tensorflow installation again.

Related

Difficulty updating keras/tensorflow on mac

I am working on a jupyter notebook script which I used last year to train a neural network.
When I try to import the keras tokenizer:
from keras.preprocessing.text import Tokenizer
I receive this error
I have seen other posts which suggest that I need to update tensorflow. My anaconda environment tells me I have 1.13.1 installed. But when I try to update tensorflow-base to 1.15 in the anaconda navigator, I receive this error:
I can update tensorflow from my command line using:
conda install tensorflow=1.15.0
But this doesn't update tensorflow in my anaconda environment and the error persists in my notebook.
Any help would be much appreciated! As you can probably tell, I am a novice python user.
The error says some packages needed to update Tensorflow/Andaconda requires Python 3.11 or newer. Since not all of the error log can be seen however, I would upgrade to python 3.7 to be safe. You can download this from the official page: https://www.python.org/downloads/
If the problem persists, try using pip to update the packages(In bash) :
pip install tensorflow
pip install conda
If you get an error while using pip, try:
pip3 install tensorflow
pip3 install conda
This same method can be used to update keras:
pip install keras
or if that does not work:
pip3 install keras
If pip is not recognized at a command, Python 3.7 is not added to path. I do not have experience with macOS, but this article should go into enough depth.
https://realpython.com/add-python-to-path/#how-to-add-python-to-path-on-linux-and-macos

Unable to install tensor flow with pip?

I just updated the latest MacOS and it wiped everything out.
I follow the steps from this website.
And I start reinstalling the tensorflow with pip3 and it's not installing anything.
I got this error from typing pip3 install --user --upgrade tensorflow .
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
FYI, my MacBook is 64-bit.
and
~ pip3 -V
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 20.2.4 from /Users/zack/Library/Python/3.8/lib/python/site-packages/pip (python 3.8)
~ python3 -V
Python 3.8.2
I don't know what happened does anyone have any ideas.
According to this documentation https://www.tensorflow.org/install/pip#package-location
and your version of python you should run
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.3.0-cp38-cp38-macosx_10_14_x86_64.whl
This is the 3rd step, so check if you got installed correctly the packages from steps 1 and 2
if pip is not up-to-date upgrade pip:
pip install --upgrade pip
then install tensorflow:
pip install tensorflow
for python 3.8 you need to install tensorflow 2.2 or later
system requirements of tensorflow:
Python 3.5–3.8
Python 3.8 support requires TensorFlow 2.2 or later.
pip 19.0 or later (requires manylinux2010 support)
Ubuntu 16.04 or later (64-bit)
macOS 10.12.6 (Sierra) or later (64-bit) (no GPU support)

Installed pytorch with conda which changed my TF version to 1.13.0 now conda install tensorflow-gpu=2.0 not working?

Like I said in title I installed pytorch with conda install and that downgraded my tensorflow version to 1.13.0 and now conda install tensorflow-gpu=2.0 is not working how can I get the command to execute?
I would suggest that you try to install tensorflow with pip. pip install -U tensorflow-gpu
https://www.tensorflow.org/install/gpu
I am using pytorch, but my env has pytorch 1.2 + tensorflow 2.1
You should have installed pyTorch in another virtual environment but since now it has been installed.
I would recommend you to create a virtual environment and install TF plus other libraries in it. Because I am sure you would not use both PyTorch and TF in the same program for ML.

TensorFlow installation problem in Python 3.4-64 bit-Win10

I'm trying to install TensorFlow. I followed the first and second phase of https://www.tensorflow.org/install/pip correctly. But I have a problem with the phase " 3. Install the TensorFlow pip package". While virtual environment(venv) is active, i'm trying to do pip install --upgrade tensorflow-gpu
but i have an error which is Could not find a version that satisfies the requirement tensorflow (from versions: )No matching distribution found for tensorflow
I'm trying to install using .whl also, but I can't find exact file for Python 3.4 64bit Win10. But in the website of tensorflow, they noted that "Requires Python 3.4, 3.5, or 3.6".
So why I got this error and how can I solve it? What am I doing wrong?
If you have an idea or experience on the subject, I would be glad if you share with me.
Thanks a lot for your help in advance.
Try to install with pip3
pip3 install --upgrade tensorflow-gpu

I am not able to update tensorflow installed with anaconda

I have been trying to update tensorflow from 1.2.1 to 1.3.
I did the following on my terminal:
pip3 install tensorflow --upgrade
After this, I tried checking the version
python3 -c 'import tensorflow as tf; print(tf.__version__)'
This outputs 1.2.1 but not 1.3.0
All this had been done in an anaconda environment.
Operating system: macOS Sierra
I would like to know how one can perform this update.
Thank you
The solution that I found was to install pip inside the conda environment and use that instance of pip to install the packages. Please refer here
The reason I got the above error was that the python3 and pip3 paths were different.
This became evident when I ran the below commands inside the conda environment.
which python3
/Users/SMBP/anaconda/envs/tensorflow/bin/python3
which pip3
/usr/local/bin/pip3
Also, I think it is better to use virtualenv and virtualenvwrapper if you wish to work with tensorflow as it is the recommended way.