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:
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
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
python3 -m pip install --no-index --find-links. tensorflow
in the directory with the copied .whl
files.
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
Requirements:- Bazel Installation , python >=2.7 and numpy.
You can use link . Installtion steps are given. I am explaining in more briefly:-
git clone https://github.com/amutu/tensorflow-offline.git
tf=/path/to/tensorflow/directory
and tp=/path/to/tensorflow/third/party/directory
.(Note:- you can check path typing $tf and $tp on terminal.)tp=/home/ai/Documents/vineet/test/tensorflow_third_party-1.2.1
tf=/home/ai/Documents/vineet/test/tensorflow-1.2.1
Run:- cd tensorflow-offline
In tensorlfow offline run:- ./fix_offline_build.sh $tf $tp
.(Note: you may also need to download tensorflow-port donwload it from here in tensorflow-port directory)
cd $tf &&./configure
bazel --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures
and bazel-bin/tensorflow/tools/pip_package/build_pip_package
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.