简体   繁体   English

Tensorflow 从源错误 ValueError 构建:在 cuda 路径配置期间 int() 以 10 为基数的无效文字:''?

[英]Tensorflow build from source error ValueError: invalid literal for int() with base 10: '' during cuda path configuration?

I'm on ubuntu 20.04 with cuda 10.1 and cudnn 7.6.5-32 and I'm trying to build from source tensorflow 2.3 but I keep getting a value error while using./configure?我在 ubuntu 20.04 和 cuda 10.1 和 cudnn 7.6.5-32 上,我正在尝试从源代码 Z2C39BC19B761AC36DC046245D1D7 构建而使用错误值但使用 a.246245D1D4。

Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 10]: 10.1.243         


Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 7.6.5.32


Please specify the locally installed NCCL version you want to use. [Leave empty to use http://github.com/nvidia/nccl]: 


Please specify the comma-separated list of base paths to look for CUDA libraries and headers. [Leave empty to use the default]: /usr/src/linux-headers-5.4.0-42/include/linux/,/usr/src/linux-headers-5.4.0-42/include/uapi/linux/,/usr/src/linux-headers-5.4.0-26/include/uapi/linux/,/usr/src/linux-headers-5.4.0-26/include/linux/,/usr/share/man/man3/,/usr/include/linux/,/usr/include/,/usr/lib/cuda/,/usr/include/


Traceback (most recent call last):
  File "third_party/gpus/find_cuda_config.py", line 648, in <module>
    main()
  File "third_party/gpus/find_cuda_config.py", line 640, in main
    for key, value in sorted(find_cuda_config().items()):
  File "third_party/gpus/find_cuda_config.py", line 578, in find_cuda_config
    result.update(_find_cuda_config(cuda_paths, cuda_version))
  File "third_party/gpus/find_cuda_config.py", line 252, in _find_cuda_config
    cuda_header_path, header_version = _find_header(base_paths, "cuda.h",
  File "third_party/gpus/find_cuda_config.py", line 240, in _find_header
    return _find_versioned_file(base_paths, _header_paths(), header_name,
  File "third_party/gpus/find_cuda_config.py", line 230, in _find_versioned_file
    actual_version = get_version(file)
  File "third_party/gpus/find_cuda_config.py", line 247, in get_header_version
    version = int(_get_header_version(path, "CUDA_VERSION"))
ValueError: invalid literal for int() with base 10: ''
Asking for detailed CUDA configuration...

I ran this command to get the base paths,我运行了这个命令来获取基本路径,

$ locate cuda.h

/snap/gnome-3-34-1804/24/usr/include/linux/cuda.h
/snap/gnome-3-34-1804/36/usr/include/linux/cuda.h
/usr/include/cuda.h
/usr/include/linux/cuda.h
/usr/share/man/man3/cuda.h.3.gz
/usr/src/linux-headers-5.4.0-26/include/linux/cuda.h
/usr/src/linux-headers-5.4.0-26/include/uapi/linux/cuda.h
/usr/src/linux-headers-5.4.0-42/include/linux/cuda.h
/usr/src/linux-headers-5.4.0-42/include/uapi/linux/cuda.h

And here are my cuda installation path,这是我的cuda安装路径,

$whereis cuda

cuda: /usr/lib/cuda /usr/include/cuda.h

And here's my nvidia and cuda version,这是我的 nvidia 和 cuda 版本,

$ nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

here's my driver这是我的司机

$ nvidia-smi


Sun Aug  2 01:39:54 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 750 Ti  Off  | 00000000:01:00.0  On |                  N/A |
| 27%   41C    P0     1W /  38W |    171MiB /  1997MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1049      G   /usr/lib/xorg/Xorg                            20MiB |
|    0      1859      G   /usr/lib/xorg/Xorg                            44MiB |
|    0      2058      G   /usr/bin/gnome-shell                          94MiB |
+-----------------------------------------------------------------------------+

Building Tensorflow with NVIDIA GPU support (or any CUDA project) from source requires that you have a full CUDA toolkit installed (which implies all of the necessary dependencies which CUDA requires). Building Tensorflow with NVIDIA GPU support (or any CUDA project) from source requires that you have a full CUDA toolkit installed (which implies all of the necessary dependencies which CUDA requires). Note that the conda distributed "cudatoolkit" package is not a full CUDA toolkit and cannot be used to build code.请注意,conda 分发的“cudatoolkit”package不是完整的 CUDA 工具包,不能用于构建代码。

You do not have a CUDA toolkit installed.您没有安装 CUDA 工具包。 Therefore you cannot build Tensorflow.因此,您无法构建 Tensorflow。

Install one.安装一个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ValueError:tensorflow中以10为底的int()的无效文字 - ValueError: invalid literal for int() with base 10 in tensorflow 错误 - ValueError:基数为10的int()的文字无效:&#39;&#39; - Error - ValueError: invalid literal for int() with base 10: ' ' 错误:ValueError:int()以10为底的无效文字: - Error: ValueError: invalid literal for int() with base 10: '' ValueError:int() 的无效文字,基数为 10:&#39;&#39; 错误 - ValueError: invalid literal for int() with base 10: '' error 获取错误“ ValueError:int()的无效文字,基数为10:&#39;3128;&#39; 在运行Tensorflow训练示例时 - Getting an error "ValueError: invalid literal for int() with base 10: '3128;' while running the Tensorflow training example Python错误ValueError:以10为底的int()的无效文字 - Python Error ValueError: invalid literal for int() with base 10 ' ' Python 数据错误:ValueError:int() 的无效文字,基数为 10:&#39;42152129.0&#39; - Python data error: ValueError: invalid literal for int() with base 10: '42152129.0' ValueError:以10为底的int()的无效文字:&#39;&#39;无法发现错误 - ValueError: invalid literal for int() with base 10: '' Unable to spot error 这是什么错误? 基数为 10 的 int() 的 ValueError 无效文字:&#39;&#39; - What is this error ? ValueError invalid literal for int() with base 10: '' Python 3错误:ValueError:以10为底的int()的无效文字:&#39;&#39; - Python 3 error: ValueError: invalid literal for int() with base 10: ''
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM