Install an older version of Tensorflow

Preface

This time, I would like to install TensorFlow 1.14.0 in order to use Keras-RL, a framework for reinforcement learning.

environment

Installation

For reporting installation

terminal


$ pip install tensorflow

When specifying the version

terminal


$ pip install tensorflow==1.14.0

However, the following error may occur.

terminal


$ pip install tensorflow==1.14.0
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

I dealt with it while looking at TensorFlow official website, but in my case I could not solve it ... (Image distribution seems to be only TensorFLow 2.X ...?) There are restrictions on the Python version depending on the version of TensorFlow, so let's check.

Solution

I was able to solve it with the following two.

1. Directly type the URL of the image file

terminal


$ pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py3-none-any.whl

2. Use pyenv

What is pyenv

pyenv is a command line tool that uses multiple versions of Python, such as Ruby's rbenv and NodeJS's nvm. It seems that the person who made this is Japanese, which is amazing. If you use this, you can decide the python version in detail for each case, so it is very convenient to use.

You can refer to this article for installing pyenv. Building a Python environment on a Mac using pyenv
Try installing Python 3.7 for TensorFlow 1.14 with pyenv.

terminal


$ pyenv install 3.7.2

Next, install TensorFlow with pip.

terminal


pip install tensorflow==1.14.0

You have successfully installed it.

Recommended Posts

Install an older version of Tensorflow
An implementation of ArcFace for TensorFlow
Install tensorflow. (Only!)
Install Tensorflow on Mac
Install the latest version of CMake on Ubuntu 18.04.4 LTS
Specify past version of chromedriver in Anaconda update / install
Summary of Tensorflow / Keras
Installation of OpenMDAO (version 1.7.1)
Install the latest version of Git on your Linux server
The story of downgrading the version of tensorflow in the demo of Mask R-CNN.
Align the version of chromedriver_binary
An introduction to private TensorFlow
Tabpy 1.0 (2020-01 version) How to install
Tuning experiment of Tensorflow data
Specify version with conda install
Install multiple versions of Python
Version upgrade of python Anaconda
Check OpenSSL version of python 2.6
Install TensorFlow 1.15.0 on Raspberry Pi
The first artificial intelligence. How to check the version of Tensorflow installed.
Environment construction of TensorFlow + JupyterNotebook + Matplotlib on Windows version Anaconda (August 2017 version)