Install tensorflow offline, tensorflow-gpu1.15.0 dependent library

Table of Contents

  • 1. Download tensorflow installation package
  • 2. pip installation
  • 3. tensorflow-gpu dependency library

————————————————

For TensorFlow 1.X, Tensorflow 1.15.0 is recommended.

For TensorFlow 2.X, use the latest version.

————————————————

1. Download tensorflow installation package

Refer to https://tensorflow.google.cn/install/source_windows#cpu for tensorflow, python and CUDA version correspondence table.
According to your python version and CUDA version, download the appropriate tensorflow from Pypi official website. Search tensorflow for the cpu version, search tensorflow-gpu for the gpu version, and the search results are all the latest version
After clicking in, click Release history on the left side of the page, and click the version you need from the historical version

Click Download files

Find the whl file download corresponding to your version, remember the path where the file is located

2. pip installation

Take the tensorflow-gpu1.15.0 linux version as an example, enter on the command line

pip install yourpath/tensorflow-1.15.0-cp37-cp37m-manylinux2010_x86_64.whl

Because of offline installation, if the dependent library does not meet the requirements at this time, a WARNING related to the network NewConnectionError will pop up, so you need to follow the prompts to install the dependent library first.

You can see what library is missing from the last line of WARNING, for example /simple/gast/ It is a prompt that the gast dependency package is missing, and it cannot be downloaded and installed because it is not connected to the Internet.

3. tensorflow-gpu dependent library

You can manually download the required dependent libraries in the mirror source. Such as Tsinghua mirror source https://pypi.tuna.tsinghua.edu.cn/simple/
For example, if you want to install gast, enter https://pypi.tuna.tsinghua.edu.cn/simple/gast/, select The corresponding version is fine.
Provide tensorflow-gpu1.15.0 dependent library version here:

keras-applications>=1.0.8
wheel>=0.26
grpcio>=1.8.6
opt-einsum>=2.3.2
six>=1.10.0
astor>=0.6.0
termcolor>=1.1.0
wrapt>=1.11.1
absl-py>=0.7.0
google-pasta>=0.1.6
gast==0.2.2
numpy=1.16.0
tensorboard=1.15.0
protobuf>=3.6.1
tensorflow-estimator==1.15.1
keras-preprocessing>=1.0.5
h5py
werkzeug>=0.11.15
setuptools>=41.0.0
markdown>=2.6.8

After all these dependent libraries are installed, pip install tensorflow’s whl file again will be successful.

Leave a Reply

Your email address will not be published. Required fields are marked *