我想在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版本?
发布于 2020-03-19 22:33:34
在关于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,这将是有意义的。
https://stackoverflow.com/questions/60765425
复制相似问题