繁体   English   中英

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

[英]How to install latest version of tensorflow on Kaggle?

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

# 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 上的输出是:

2.1.0

所以它没有选择我尝试安装的版本。

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

在关于 TPU 使用的 Kaggle 文档中,他们指定 TensorFlow 2.1 支持 TPU,所以我想知道它是否可能。 您不必卸载 TensorFlow,老实说,我不确定卸载是否会有所作为。

这是我在 Kaggle 笔记本中尝试的内容:

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

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 用于他们的内核,那将是有道理的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM