2016-08-27 5 views
-1

이상한 설정 오류가 발생합니다. 해독 할 수 없습니다. 다른 어떤 ppl도이 문제가 발생하지 않은 것 같습니다. CUDA가 올바르게 구성되었습니다. 이 'repository_rule'및 '외부'패키지는 무엇입니까?우분투에서 TF 설치 실패 14.04

(tensorflow)[email protected]:~/tensorflow$ ./configure 
Please specify the location of python. [Default is /home/weiwe/tensorflow/bin/python]: 
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] 
No Google Cloud Platform support will be enabled for TensorFlow 
Traceback (most recent call last): 
    File "<stdin>", line 18, in <module> 
TypeError: can only concatenate list (not "str") to list 
Found possible Python library paths: 
Please input the desired Python library path to use. Default is [] 
/home/weiwe/tensorflow/lib/python2.7/site-packages 
Do you wish to build TensorFlow with GPU support? [y/N] y 
GPU support will be enabled for TensorFlow 
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: 
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 
Please specify the location where CUDA toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: 
Please specify the Cudnn version you want to use. [Leave empty to use system default]: 
Please specify the location where cuDNN library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: 
libcudnn.so resolves to libcudnn.4 
Please specify a list of comma-separated Cuda compute capabilities you want to build with. 
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. 
Please note that each additional compute capability significantly increases your build time and binary size. 
[Default is: "3.5,5.2"]: 
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes. 
......... 
ERROR: /home/weiwe/tensorflow/third_party/gpus/cuda_configure.bzl:415:18: function 'repository_rule' does not exist. 
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '@local_config_cuda//cuda:build_defs.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository. 
Configuration finished 
(tensorflow)[email protected]:~/tensorflow$ bazel build -c opt --config=cuda \ 
>  //tensorflow/tools/pip_package:build_pip_package 
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '@local_config_cuda//cuda:build_defs.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository. 
INFO: Elapsed time: 0.380s 
(tensorflow)[email protected]:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer 
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '@local_config_cuda//cuda:build_defs.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository. 
INFO: Elapsed time: 0.109s 
(tensorflow)[email protected]:~/tensorflow$ bazel clean 
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes. 
(tensorflow)[email protected]:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer 
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '@local_config_cuda//cuda:build_defs.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository. 
INFO: Elapsed time: 0.242s 

답변

1

최근에 쿠다 빌드 레이어에 패치가있었습니다. 당신이 그 오류를

Error loading package 'external': Extension file '@local_config_cuda//cuda:build_defs.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository. 

을 일단 당신은 다시 실행하기 ./configure를 다시 목표를 다시 만들어야합니다.

이 무심하고 구성 과정을 건너 뛸 수있는 방법이 될 수는

PYTHON_BIN_PATH=$HOME/anaconda2/bin/python CUDA_TOOLKIT_PATH="/usr/local/cuda" CUDNN_INSTALL_PATH="/usr/local/cuda" TF_NEED_CUDA=1 TF_CUDA_COMPUTE_CAPABILITIES="6.1" TF_CUDNN_VERSION="5" TF_CUDA_VERSION="8.0" TF_CUDA_VERSION_TOOLKIT=8.0 ./configure 

그것이

희망이 도움 명령 줄에서 변수 설정을 제공하는 것입니다
관련 문제