Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install tensorflow on a offline computer

I am trying to install tensorflow on a machine with no internet access: the machine has Windows 7 and Python 3.6 Anaconda.

I tried different approaches but non of them worked.

This what i did so far:

  • install anaconda with python 3.6
  • pip install tensorflow tensorflow-1.3.0-cp36-cp36m-win_and64.whl

But when I try to import tensorflow i get the following error:

ModuleNotFoundError: No module name google

I have read that I should install protobuf-3.6.tar.gz but I get the error :register_loader_type...

So I installed setuptools-3.6-py2.py3-none-any.whl

and I still get the same error

So my question is: is there any way to install tensorflow on a offline computer or there is something that I did wrong?

NOTE: I am admin on this offline machine

like image 382
Papom Avatar asked Dec 31 '18 11:12

Papom


People also ask

Can TensorFlow run without Internet?

Once Tensorflow installed you can use it offline without internet.

Can I pip install TensorFlow?

Install TensorFlow with Python's pip package manager. TensorFlow 2 packages require a pip version >19.0 (or >20.3 for macOS). Official packages available for Ubuntu, Windows, and macOS.


2 Answers

python3 -m pip download tensorflow on a machine with internet with the same OS. You will download all the needed packages to the current directory. Move the files onto a USB, mount the USB on the device without internet, and then do python3 -m pip install --no-index --find-links . tensorflow in the directory with the copied .whl files.

like image 168
Frederik Bode Avatar answered Sep 21 '22 14:09

Frederik Bode


create anaconda conda virtul environment in some internet available system and install necessary package for your project and copy virtual environment to you system. put inside anaconda env, it works

like image 25
Chandan Avatar answered Sep 21 '22 14:09

Chandan