【问题标题】:TensorFlow Importing error ( Using Anaconda)TensorFlow 导入错误(使用 Anaconda)
【发布时间】:2019-05-02 06:13:49
【问题描述】:

我已经在我的系统中安装了 anaconda,Python 版本是(3.7),我也想安装 TensorFlow。由于我的系统需要“python3.7”,我为 TensorFlow(使用 conda promt)创建了一个环境并安装了“python 3.6”。安装和一切都很好,但是现在当我导入 TensorFlow 时,我收到以下错误。

ImportError: DLL load failed: The specified module could not be found. Failed to load the native Tensor-flow runtime.

系统信息():

  1. i5 HP Inspiron、AMD 显卡

尝试下载 DLL 文件并粘贴到系统文件夹中。但没有帮助。 我发现的其他解决方案是通过 CUDA,仅在 nvidia 图形可用时才适用。

【问题讨论】:

    标签: git python-3.x tensorflow anaconda amd


    【解决方案1】:

    您能否尝试以下对我们很有效的步骤。

    对于 Linux 机器:

    1)使用以下命令创建虚拟环境

    conda create -n env_tensor -c intel python=3.6
    

    2)激活环境

    source activate env_tensor
    

    3)在激活的环境中安装tensorflow

    pip install tensorflow
    

    适用于 Windows 机器

    1)使用以下命令创建虚拟环境

    conda create -n env_tensor python=3.6
    

    2)激活环境

    conda activate env_tensor
    

    3)在激活的环境中安装tensorflow

    pip install tensorflow
    

    (这里的“env_tensor”是环境名称,可以使用任何名称)。

    执行上述步骤后请尝试导入tensorflow。

    【讨论】:

    • 这行得通,但是当我尝试将 tensorflow-gpu 与 tensorflow 一起安装时,再次发生 DLL 故障。不过感谢您的帮助!。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-30
    • 2020-01-10
    • 2019-05-02
    • 1970-01-01
    • 2019-10-12
    相关资源
    最近更新 更多