So, I've installed Bazel via Chocolatey, installed Python 3.5 and 2.7, installed CUDA v8, and cuDNN v6, and installed JDK 8.0, I'm now trying to custom-build TensorFlow on my Windows 10 device, with AVX, AVX 2 and CUDA. TensorFlow-GPU, the pre-built version, does work, I've already tested and run that successfully.
I've followed the instructions of other articles, both on TensorFlows' actual site (trying to adapt some sections from the Linux/Mac installs), and on here. The furthest I've made it is; cloning the Github repository via Msys2, running configure.py, then attempting to build via bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package I receive an error, the header of which is:
Error reading java.io.IOException: CreateProcess(): The system cannot find the file specified.
: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/cudnn.h
I've double checked, that file does exist, so I'm not sure why I'm getting this error.
EDIT: Also attempted to run via Powershell, reached the same point.
Any help would be much appreciated.
I had the exact same error while trying to build Tensorflow on Windows (using cuDNN 5.1). I fixed it by launching bazel from the msys2 terminal (instead of from the windows command prompt) and manually setting the BAZEL_SH environment variable before attempting to build.
export BAZEL_SH=c:/tools/msys64/usr/bin/bash.exe
bazel build -c opt --config=win-cuda tensorflow/cc:cc_ops
The following steps helped me to compile Tensorflow on Windows 10.
pacman -Syuu patch
ln -s "c:\python27\python.exe" /usr/bin/python
export BAZEL_SH=c:/tools/msys64/usr/bin/bash.exe
"C:\Documents and Settings\All Users\chocolatey\bin\bazel.exe" build --config=opt --config=win-cuda //tensorflow/tools/pip_package:build_pip_package
But after 1 hour of compilation I got another error:
C:\tools\msys64\tmp_bazel_dmitry\x1e5egqw\execroot\org_tensorflow\external\protobuf_archive\python\google\protobuf\internal\api_implementation.cc
: fatal error C1083: Cannot open compiler generated file: '': Invalid
argument Target //tensorflow/tools/pip_package:build_pip_package
failed to build
Related
I'm trying compiling Tensorflow 1.15 on Odroid-XU4 and getted some error that seems not related and exclusive to my platform. I installed Tensorflow 1.13 by source compile successfully. But for TF1.15 I got some error which experienced when use TF1.15.0 and TF1.15.1 and TF1.15.3.
My command to build using Bazel 0.26.1 is:
bazel --output_base=/media/odroid/.../CacheFolder build --config=opt --config=monolithic --config=noaws --jobs 1 --define=grpc_no_ares=true --local_resources 1536,0.5,1.0 tensorflow:libtensorflow_cc.so --discard_analysis_cache
After getting error for package "#io_rules_docker" which fixed by adding manually in WORKSPACEFILE and some same error I got this error:
>no such package '#highwayhash//': BUILD file not found on package path and referenced by '//tensorflow/core/platform/default/build_config:platformlib'
How can I solve this?
I need to compile Tensorflow from source for compute capability 3.0
I was compiling Tensorflow and I got this error after 6 hours of compiling:
cache/bazel/_bazel_maydin/435ff134a8a529ccec16636685173684/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/preprocessing/__init__.py", line 21, in <module>
import keras_preprocessing
ModuleNotFoundError: No module named 'keras_preprocessing'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 20674.165s, Critical Path: 247.43s
INFO: 12297 processes: 12297 local.
FAILED: Build did NOT complete successfully
In below link, I found this answer and I think it will work.
Error Compiling Tensorflow From Source - No module named 'keras_applications'
pip install keras_applications==1.0.4 --no-deps
pip install keras_preprocessing==1.0.2 --no-deps
pip install h5py==2.8.0
I also got similar error before beginning of build where it says numpy is missing, i just installed it via pip and build started without problem.
But I am scared to run build command again. Because I don't want to compile everything 6 hours again.
If I start building again does it start all over from beginning or it continue from where it failed?
Build command I used is this:
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
I cloned tensorflow repository, checkout to branch 2.0 and started build.
Additional info about system:
Cuda 10.0.130
cuDNN 7.6.2
Bazel 0.26.1
Ubuntu 18.04
It resumes compiling where it left off after fixing errors.
hey guys im trying to install tensorflow
c++ on windows 10 but im running into this
issue when i try to do the bazel command
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
As a basic sanity check to resolve your problem, you need to make sure you are running a specific version of TensorFlow using the recommended bazel build tool as specified in the instructions:
https://www.tensorflow.org/install/source
For example, TensorFlow v0.9 should go with Bazel tool v0.11.0. Could you provide this information for you case ?
I'm trying to build tensorflow on aarch64 linux board computer.
But tensorflow's bazel settings use armeabi-v7a config to build libjpeg-turbo.
This cause build error gcc: error: unrecognized command line option '-mfloat-abi=softfp' (aarch64 gcc has no softfp option).
I think that bazel recognizes my build environment as android armeabi-v7a (correct is linux aarch64), but I don't know how to check that and how to control that.
Bazel does not have functions/values like as cmake's message/CMAKE_SYSTEM_PROCESSOR. This is very irritating me.
This first time for me to install Tensorflow. I followed the instructions on official website here. I installed from source because I found some people advice to do that instead of pip installation. I used version r0.9 of tensorflow and I installed it on Ubuntu-mate 15.10. I followed all instructions. Installed python, cuda version 7.5, cudnn release 5. Nvidia GPU 5200 with compute capability of 2.1. Every thing went well until I reached bazel build step here,
Latitude-E6430:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
"Latetude-E6430" is the user of the machine.
I got the following errors immediately:
ERROR: /home/meqdad/tensorflow/tensorflow/core/BUILD:91:1: //tensorflow/core:protos_all_py: no such attribute 'imports' in 'py_library' rule.
ERROR: /home/meqdad/tensorflow/tensorflow/cc/BUILD:28:1: Target '//tensorflow/core:sparse_ops_op_lib' contains an error and its package is in error and referenced by '//tensorflow/cc:ops/sparse_ops_gen_cc'.
ERROR: Loading failed; build aborted.
I tried to find a solution to this problem, I was using bazel 0.1 then I upgraded to bazel 0.3. However, on the net, there is several issues like this one but non of them was related to this one. I re-installed py_library but it did nothing to solve the problem.
Please can you advice me how to move on with this step of installation.