【问题标题】:can not update Tensorflow for Conda无法为 Conda 更新 Tensorflow
【发布时间】:2020-04-15 22:24:09
【问题描述】:

我想将 Tensorflow 从 1.14 更新到 2.1.0,但我做不到。

使用命令安装后

conda install -c anaconda tensorflow-gpu

print(tensorflow.version) 显示我的版本为 1.14.0

以后一样

conda 更新 tensorflow-gpu

即使之后

conda 安装https://anaconda.org/anaconda/tensorflow-gpu/2.1.0/download/win-64/tensorflow-gpu-2.1.0-h0d30ee6_0.tar.bz2

我进入命令提示符:

Downloading and Extracting Packages
tensorflow-gpu-2.1.0 | ######################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

C:\Windows\system32>set "KERAS_BACKEND="

C:\Windows\system32>python C:\Anaconda3\etc\keras\load_config.py  1>temp.txt

C:\Windows\system32>set /p KERAS_BACKEND= 0<temp.txt

C:\Windows\system32>del temp.txt

C:\Windows\system32>python -c "import keras"  1>nul 2>&1

C:\Windows\system32>if errorlevel 1 (
ver  1>nul
 set "KERAS_BACKEND=theano"
 python -c "import keras"  1>nul 2>&1
)

但我仍在使用 1.14.0

【问题讨论】:

  • 一个很好的问题是为什么会发生这种情况?为什么windows的默认版本是1.14?很烦人:-(

标签: python-3.x tensorflow conda


【解决方案1】:

您可以通过在 Anaconda Prompt 中键入此命令来更新 Tensorflow。

conda install -c conda-forge tensorflow=2.1.0

希望这行得通!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-25
    • 1970-01-01
    • 2017-07-22
    • 2017-07-29
    • 2019-06-26
    • 1970-01-01
    相关资源
    最近更新 更多