Anaconda installs TensorFlow 1.15 instead of 2.0(Anaconda 安装 TensorFlow 1.15 而不是 2.0)
问题描述
我一直在尝试在 Anaconda 中安装 Tensorflow 2.0.
到目前为止,tensorflow 工作正常(我可以在我的代码中使用该库),但是当我安装它时,它显示正在安装版本:2.0",然后我得到了 1.15 版本.
整个包的结果是可更新的(因为版本 2.0 确实存在并且应该可用),但即使我尝试更新它,我也会不断得到 1.15,它又回到了可更新状态,然后我又回到了循环中.
我尝试了从 Anaconda Navigator 界面和使用 conda update tensorflow 的提示,但没有任何成功.
这里有链接包:
.如 tf.keras 更可取,开发将继续进行2.3.0" rel="nofollow noreferrer">F.肖莱特
tf.python.keras
I've been trying to install Tensorflow 2.0 in Anaconda.
So far, tensorflow works fine (i can use the library in my code), but when i'm installing it, it says "installing version: 2.0", then i get version 1.15 instead.
The whole package results updatable (since versione 2.0 does exist and should be available), but even if i try to update it, i keep getting 1.15, which gets back to updatable, and i get back into the loop.
I tried both from the Anaconda Navigator interface and the prompt using conda update tensorflow
, without any success.
Here's there is the link package: tensorflow 2.0 Anaconda
How can i solve the problem?
EDIT :
I successfully installed TensorFlow 2.0 using conda install -c anaconda tensorflow
. Then i got back into Anaconda Navigator and i tried to install Keras 2.2.4.
Looking at the installed packages, seems that installing Keras overwrites the version 2.0 of TensorFlow with the 1.15, am i wrong? Is this a bug?
Here's the image:
conda install -c anaconda tensorflow-gpu
or
conda install -c anaconda tensorflow
Look for these:
Tip: completely shred any file w/ name substring "keras" and "tensorflow" in your Anaconda environment before installing - else stuff is likely to break.
- Navigate to your
site-packages
- Search
**keras**
--> delete all results - Search
**tensorflow**
--> delete all results
Above should work even better from the environment's root folder (e.g. envs/tf2_env
) -- the idea is, Anaconda caches whatever it's already installed, so if it isn't completely removed, you may find trouble getting latest vers of packages.
Related Q's answered in comments:
Why is conda reverting TF 2 to TF 1.15.0 when I try installing Keras 2.2.4?
- TF2's only compatible w/ Keras 2.2.5+, so conda is taking care of compatibility
Why are some
from keras
imports no longer working and needfrom tensorflow.keras
?from keras
is very different fromfrom tensorflow.keras
, implementation-wise.from keras
is backend-neutral, whereastf.keras
is more tightly integrated w/ TF. There can also be significant performance differences. TF2 and onward,tf.keras
is preferable, and development will proceed along it, as noted by F. Chollet- Also beware of
tf.python.keras
这篇关于Anaconda 安装 TensorFlow 1.15 而不是 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Anaconda 安装 TensorFlow 1.15 而不是 2.0


基础教程推荐
- Python 的 List 是如何实现的? 2022-01-01
- 将 YAML 文件转换为 python dict 2022-01-01
- 哪些 Python 包提供独立的事件系统? 2022-01-01
- 合并具有多索引的两个数据帧 2022-01-01
- 使 Python 脚本在 Windows 上运行而不指定“.py";延期 2022-01-01
- 使用 Google App Engine (Python) 将文件上传到 Google Cloud Storage 2022-01-01
- 使用Python匹配Stata加权xtil命令的确定方法? 2022-01-01
- 如何在 Python 中检测文件是否为二进制(非文本)文 2022-01-01
- 症状类型错误:无法确定关系的真值 2022-01-01
- 如何在Python中绘制多元函数? 2022-01-01