【问题标题】:Conda VE errors when installing "tensorflow"安装“tensorflow”时出现 Conda VE 错误
【发布时间】:2021-12-05 11:00:26
【问题描述】:

当尝试在 conda VE 中设置 tensorflow 时,我遇到了大量错误。我已经在这里和在线检查过,它似乎与 tensorflow 的 GPU 和 VM 版本有关我没有安装

W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)

我也遇到了很多错误,例如:

W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found

I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2

还有

To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

同时进行

我尝试删除并重新创建我的 conda 环境,但我遇到了同样的错误。

详情: Python 3.7 版

conda activate tensorflow
pip install python=3.7

Tensorflow 2.6 版(CPU 版本不是 GPU)

【问题讨论】:

  • 你能发布整个输出吗?那只是警告。 TF 在某些操作中使用 AVX AVX2 并且找不到 GPU 的 nvcuda.dll 的信息消息。只需在 CPU 上使用 TF。
  • 试试这个:stackoverflow.com/questions/53614262/… 你可能试图在没有访问 gpu 的情况下安装 tensorflow 的 gpu 版本。
  • 我相信错误可能来自试图自动安装的 TF GPU 版本,而不是默认的 CPU 版本。我会尝试进一步研究它,但这就是我猜测问题来自

标签: python tensorflow conda


【解决方案1】:

它是如何解决的: 通过手动安装 CPU 版本的 tensorflow 解决了问题。 https://www.pugetsystems.com/labs/hpc/TensorFlow-Installation-CPU-version-1129/

问题: 它是自动 pip 安装 CUDA GPU 版本的 tensorflow,因此无法使用我的未启用 CUDA 的 GPU。

如果遇到如下错误:

W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303) 

W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

这也可能是你的问题

【讨论】:

    猜你喜欢
    • 2020-04-18
    • 2020-01-03
    • 1970-01-01
    • 2020-11-02
    • 2021-05-29
    • 1970-01-01
    • 1970-01-01
    • 2019-05-04
    • 2020-08-28
    相关资源
    最近更新 更多