tensorflow: [SOLVED] Failed to build 1.13.0-rc2 with CUDA in Windows 7

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): WINDOWS 7
  • TensorFlow installed from (source or binary): SOURCE
  • TensorFlow version: 1.13.0-rc2
  • Python version: 3.7
  • Installed using virtualenv? pip? conda?: building
  • Bazel version (if compiling from source): 0.21
  • GCC/Compiler version (if compiling from source): MSVS 2015 14.0.24215.1
  • CUDA/cuDNN version: 10 / 7.4.2.24
  • GPU model and memory: NVIDIA QUADRO k5000 4GB (3.0)

Describe the problem Building from source in Windows 7 with CUDA 10 support for 3.0 computing capability, with a clean Python 3.7 installation, fails with the message: ImportError: DLL load failed: The specified module could not be found.

Provide the exact sequence of commands / steps that you executed before running into the problem

  • Installed CUDA 10 and cuDnn 7.4.2.24
  • Installed mysys64 in C:/mysys64
  • Installed bazel 0.21
  • Installed a fresh 3.7 Python in %APPDATA%/Programs/Python
  • pip3 install six numpy wheel
  • pip3 install keras_applications --no-deps
  • pip3 install keras_preprocessing --no-deps
  • configured all enviroment variables according to the tutorial
  • downloaded and extracted tensorflow 1.13.0-rc2 release
  • opened VS 2015 x64 Native Tools Command Prompt as Administrator
  • entered the tensorflow source dir
  • python ./configure.py
  • bazel build --config=opt --config=cuda --define=no_tensorflow_py_deps=true //tensorflow/tools/pip_package:build_pip_package

Any other info / logs

INFO: From Linking tensorflow/contrib/boosted_trees/python/ops/_boosted_trees_ops.so:
   Creating library bazel-out/x64_windows-opt/bin/tensorflow/contrib/boosted_trees/python/ops/python/ops/lib_boosted_trees_ops.so.ifso and object bazel-out/x64_windows-opt/bin/tensorflow/contrib/boosted_trees/python/ops/
INFO: From Linking tensorflow/contrib/tpu/python/ops/_tpu_ops.so:
   Creating library bazel-out/x64_windows-opt/bin/tensorflow/contrib/tpu/python/ops/python/ops/lib_tpu_ops.so.ifso and object bazel-out/x64_windows-opt/bin/tensorflow/contrib/tpu/python/ops/python/ops/lib_tpu_ops.so.exp
ERROR: C:/users/reinert/downloads/tensorflow-1.13.0-rc2/tensorflow/BUILD:573:1: Executing genrule //tensorflow:tf_python_api_gen_v1 failed (Exit 1): bash.exe failed: error executing command
  cd C:/users/reinert/_bazel_reinert/kbgdyy6s/execroot/org_tensorflow
  SET CUDA_TOOLKIT_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0
    SET CUDNN_INSTALL_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0
    SET PATH=C:\msys64\usr\bin;C:\msys64\bin
    SET PYTHON_BIN_PATH=C:/Users/reinert/AppData/Local/Programs/Python/Python37/python.exe
    SET PYTHON_LIB_PATH=C:/Users/reinert/AppData/Local/Programs/Python/Python37/lib/site-packages
    SET TF_CUDA_CLANG=0
    SET TF_CUDA_COMPUTE_CAPABILITIES=3.0
    SET TF_CUDA_VERSION=10.0
    SET TF_CUDNN_VERSION=7
    SET TF_NEED_CUDA=1
    SET TF_NEED_OPENCL_SYCL=0
    SET TF_NEED_ROCM=0
  C:/msys64/usr/bin/bash.exe bazel-out/x64_windows-opt/genfiles/tensorflow/tf_python_api_gen_v1.genrule_script.sh
Execution platform: @bazel_tools//platforms:host_platform
Traceback (most recent call last):
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\reinert\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\reinert\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\tools\api\generator\create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "\\?\C:\Users\reinert\AppData\Local\Temp\Bazel.runfiles_t5_pd1qh\runfiles\org_tensorflow\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\reinert\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\reinert\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 2166,410s, Critical Path: 1238,93s
INFO: 4651 processes: 4651 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Closing this out since I understand it to be resolved, but please let me know if I’m mistaken. Thanks!