close

How to downgrade tensorflow, multiple versions possible?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to downgrade tensorflow, multiple versions possible in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to downgrade tensorflow, multiple versions possible?

  1. How to downgrade tensorflow, multiple versions possible?

    After you have install virtualenv you can create a virtual environment for the tutorial and install the tensorflow version you need in it:

  2. downgrade tensorflow, multiple versions possible

    After you have install virtualenv you can create a virtual environment for the tutorial and install the tensorflow version you need in it:

Method 1

Pip allows to specify the version

pip install tensorflow==1.1

Method 2

Is it possible to have multiple version of tensorflow on the same OS?

Yes, you can use python virtual environments for this. From the docs:

A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.

After you have install virtualenv you can create a virtual environment for the tutorial and install the tensorflow version you need in it:

PATH_TO_PYTHON=/usr/bin/python3.5
virtualenv -p $PATH_TO_PYTHON my_tutorial_env 
source my_tutorial_env/bin/activate # this activates your new environment
pip install tensorflow==1.1

PATH_TO_PYTHON should point to where python is installed on your system. When you want to use the other version of tensorflow execute:

deactivate my_tutorial_env

Now you can work again with the tensorflow version that was already installed on your system.

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read