I downloaded anaconda which has a python 3.8 version. and i installed tensorflow with pip install tensorflow.
from tensorflow.contrib import learn in my code did not work as tensorflow 1.x doesnt work in python 3.8.
I downgraded to python 3.7 by conda install python==3.7. and then pip install tensorflow==1.15. But it still did not work and errors came up -- regarding python version still being 3.8 inside python.exe.
How can I go about it? Is there an alternate way to install? Please help. Thank you
You can download tensorflow1.X from https://pypi.org/
For example tensorflow1.15.0. Select the whl file corresponding to your system.
Then use pip install path/tensorflow-1.15.0-XXXX.whl or
conda install path/tensorflow-1.15.0-XXXX.whl to install.
Related
I need an installation of old Tensorflow 1.4.x on my Jupyter Notebook, but I was not able to find an old source.
So I tried to install the latest version and then to migrate my Python scripts using the converter of the Tensorflow homepage. It did not work.
Also changing the behaviour of the TF 2.x to act as 1.x in the import statement of the .py scripts did not work - as often suggested here on stackoverflow.
So I really need an installation of TF 1.4.x
Any clue how to do that?
Thanks
Select a specific version of tensorflow from those available here. Then you can download the required specific .whl file and install that.
python -m pip install tensorflow-1.14.0-cp37-cp37m-win_amd64.whl
Optionally, you should be able to install with:
python -m pip install tensorflow==1.14.0
or
python -m pip install tensorflow==1.15.5
As long as there's a version available for Python version you're on. Ex. The 1.14.0 version is not available for Python 2.7, but it is available for 3.7.
I want to install TensorFlow, I have tried everything from reinstalling everything to trying different versions it doesn't help.
I have tried it with python 3.9.0 and pip version 20.0.3
Currently (1st of March, 2021), there is no official stable tensorflow version for the latest stable python 3.9.
However, nightly version of tensorflow supports python 3.9.
Simply pip install tf-nightly-gpu or pip install tf-nightly
Note, the library name is the same, e.g. importing works as import tensorflow as tf without any problems. This means you will not have to update your code once official support is added and you've migrated to the stable version.
The Official TensorFlow website specifies python 3.5-3.8.
You need to create a new environment as suggested in the previous answer with a new version of python, or uninstall python 3.9 and install other version. I use python 3.6.8 for Tensorflow and it works great.
I had the similar problem but I am able to resolve it by downloading the python version 3.8.6 and installing it. Please pay attention to add the python and the respective pip path in the environment.
Then give the command, which will install tensorflow version 2.3.1
pip install tensorflow
You may upgrade the pip by following command,
py -m pip install --upgrade pip
I hope that it works for you.
Please guide me the steps and source to install Tensorflow and keras on Windows 10 home edition using python (pip)?
Try the following at command prompt:
pip install --upgrade tensorflow
pip install --upgrade keras
Also, refer the following link for more detail:
https://www.tensorflow.org/install/pip
I had many issues installing tensorflow and keras by using: pip install...
I would suggest to you Anaconda.navigator. Although It is slower than Anaconda prompt, it helped me to understand the installation process. It worked for me.
First, I uninstalled old versions of Python and Anaconda and Installed Anaconda for Python 3.7 from here (Anaconda3-2019.10-Windows-x86_64.exe) (At this time Tensorflow and keras do not support Python 3.8).
In the Anaconda.Navigator I went to "environments" select "create" (create new environment) and name it. Then, on your new environment select what ever you want to install (tensorflow, tensorflow-gpu, keras, keras-gpu). Make sure that Python lower than 3.8 is on your new environment. This video1 and video2 may help you.
I hope you solve your problem.
This is my first question on stackoverflow, please bear with me as I will do my best to provide as much info as possible.
I have a windows 10, 6-bit processor. My end goal is to use keras within spyder. The first thing I did was update python to 3.6 and install tensorflow, which seemed to work. When I attempted to get keras, however, it wasn't working, and I read that keras worked on python 3.5. I successfully installed keras on python 3.5, which automatically installed theano as the backend.
But now I have two spyder environments, one running off of python 3.5, one off of 3.6. The 3.5 reads keras but doesn't go through with any modules because it cannot find tensorflow. The 3.6 can read tensorflow, but cannot find keras.
Please let me know what you would recommend. Thank you!
Create a virtualenv with python 3.5 installed.
I dealt with this same issue, using Jupyter Notebook. Didn't understand why you would even need a virtualenv until I learned from this roadblock.
Full details on installing and setting up a virtualenv can be found here:
http://pymote.readthedocs.io/en/latest/install/windows_virtualenv.html
Odd, the installation instructions say that TF only supports Python 3.5 on Windows. I would uninstall TF with pip uninstall tensorflow (if you installed it with pip to begin with) using pip from your Python 3.6 path, then re-install (pip install --upgrade tensorflow) making sure that you are running pip from your Python 3.5 path.
I had some issues with my tensorflow's installation too.
I personnaly used anaconda to solve the problem.
After installing anaconda (Maybe uninstall the old one if you already have one), launch an anaconda prompt and input conda create -n tensorflow python=3.5, afther that, you must activate it with activate tensorflow.
Once it's done, you have to install tensorflow on your python 3.5.
For that, use:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.2.0rc1-cp35-cp35m-win_amd64.whl
for cpu version
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.2.0rc1-cp35-cp35m-win_amd64.whl for gpu version
You now have the r1.2 version of tensorflow.
Then, just use pip install keras and keras will be installed.
Now, all you have to do is launch anaconda navigator, select tensorflow on the scrolling menu and launch spyder/jupyter.
You can now use Keras with a tensorflow backend in Python 3.5
Hope it helped someone ! (It take me so much time to find it by myself)
I am trying to follow to the installation guide on tensorflow.org and have installed Python version 2 again for that reason using Homebrew.
When I run the installation as described
$ pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
I get this error message:
tensorflow-0.5.0-py2-none-any.whl is not a supported wheel on this platform.
I am obviously doing something wrong, but have no idea. Any clues?
I do not want to use virtualenv, since anaconda already comes with its own environment management conda. When installing the newest version 0.6.0 directly with pip install, I had a similar error. It seemed to not resolve the dependencies correctly.
Here is what you can try:
Install anaconda
Create a new conda workspace
Download the specific protobuf version that tensorflow needs: https://pypi.python.org/pypi/protobuf/3.0.0a3
Install it via sudo easy_install ~/Downloads/protobuf-3.0.0a3-py2.7.egg
Install a numpy version greater than 1.08.x via conda install numpy
Download the 0.6.0 version of tensorflow: https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py2-none-any.whl
Install via pip install ~/Downloads/tensorflow-0.6.0-py2-none-any.whl
When you install tensorflow from the whl file directly, it should tell you when dependencies are not there. It seems not to be able to resolve these conflicts independently. My setup had issues with protobuf and numpy. After installing them manually everything worked fine.
I hope this helps!
It seems to be a common issue. Try to install it in the virtualenv. Its a much better solution, as you can always easily set up a new version of tensorflow without conflicts.
VirutalEnv Tutorial:
http://tensorflow.org/get_started/os_setup.md#virtualenv-based_installation
On the Mac, I didn't have any problem installing tensorflow with the anaconda version of python: https://www.continuum.io/downloads
The anaconda version also provides science, math, engineering, and data analysis packages. A lot of people on https://www.kaggle.com/ seem to use this...just a thought.