首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在Kaggle上安装最新版本的tensorflow?

如何在Kaggle上安装最新版本的tensorflow?
EN

Stack Overflow用户
提问于 2020-03-19 21:38:38
回答 1查看 843关注 0票数 1

我想在Kaggle上使用一个特定版本的Tensorflow。

代码语言:javascript
运行
复制
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in 
!pip uninstall tensorflow -y
!pip install -q tensorflow-datasets tf-nightly==2.2.0-dev20200319
import tensorflow as tf
import tensorflow_datasets as tfds
import os
# Input data files are available in the "../input/" directory.
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory

print(tf.__version__)

Kaggle的输出是:

代码语言:javascript
运行
复制
2.1.0

所以它没有拿起我试过要安装的版本。

我如何在kaggle上使用2.2.X版本?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-03-19 22:33:34

在关于TPU使用的Kaggle文档中,它们指定通过TensorFlow 2.1支持TPU,所以我想知道这是否可能。您不应该卸载TensorFlow,老实说,我不确定卸载是否会产生影响。

下面是我在Kaggle笔记本上尝试过的:

!pip install tensorflow==2.2给出了这个错误:

代码语言:javascript
运行
复制
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f407a69b080>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/tensorflow/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f407a69bba8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/tensorflow/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f407a5f7160>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/tensorflow/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f407a5f7128>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/tensorflow/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f407a5f72e8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/tensorflow/
ERROR: Could not find a version that satisfies the requirement tensorflow==2.2 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.2

!pip install tensorflow==1.1给出了同样的错误

但是,!pip install tensorflow!pip install tensorflow==2.1可以工作,但是它安装TensorFlow 2.1。

查看https://www.kaggle.com/docs/tpu以获得更多信息,或者也值得发送电子邮件询问他们。如果他们只对他们的内核使用TF-2.1,这将是有意义的。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60765425

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档