tensorflow 1.4 needed on Jupyter Notebook (Python) - python

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.

Related

How to use lower version of keras and tensorflow

I'm running a code which requires keras version 1.2.0 and tensorflow version 1.1.0.
I'm using Jupyter notebook and I created an environment for all the dependencies.
However, I mistakenly installed both libraries again through pip command which installed the latest versions.
I closed the notebook, opened it again and created the environment once again so the older version of both libraries were installed again.
But when I run keras.__version___ command, it shows 2.4.3, which i do not want.
I also ran conda remove keras --force and pip uninstall keras, but it's still showing the latest version.
The code is only compatible with the older version. Please help.
It's probably because it is getting uninstalled on a different environment. Identify which python and pip executable you are using by running the following commands:
$ which pip
$ which python
These two commands will give out the path of the executable from which we can determine the environment. If it is different from what you were using you can try installing to the desired environment by running:
/path/to/desired/pip uninstall keras
/path/to/desired/pip install keras==1.2.0

installing tensorflow 1.x to use tensorflow.contrib

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.

tensorflow installation in python 3.9.0(64 bit) and pip version 20.2.3 .?

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.

How to install Tensorflow and Keras library on windows 10 home edition?

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.

Switching from tensorflow on python 3.6 to python 3.5

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)

Categories

Resources