使用Rstudio安装keras和tensorflow

问题描述 投票:7回答:1

在尝试遵循在Rstudio链接https://keras.rstudio.com/index.html上安装Keras和TensorFlow的说明时,我收到以下错误。它是运行Windows 7的工作计算机。我不熟悉python,但我相信我已经正确安装了python 3.6(我能够在Spyder IDE中运行简单的python代码)。提前感谢您提供有关如何使其正常工作的任何建议。

> install_keras()
Creating r-tensorflow conda environment for TensorFlow installation...
Solving environment: ...working... failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url 
<https://repo.continuum.io/pkgs/main/noarch/repodata.json.bz2>
 Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your 
way.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/main/noarch/repodata.json.bz2 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000000000474D860>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))",),)


Error: Error 1 occurred creating conda environment r-tensorflow
In addition: Warning message:
running command '"C:\Users\...\...\Local\CONTIN~1\ANACON~1\Scripts\conda.exe" "create" "--yes" "--name" "r-tensorflow" "python=3.6"' had status 1 
python r windows tensorflow keras
1个回答
6
投票

使用install_keras()安装Keras和TensorFlow不需要使用Keras R软件包。您可以按照Keras网站上的说明自定义安装Keras(以及所需的后端),Keras R软件包将查找并使用该版本。

Source

因此,您可以使用自定义安装来防范此问题。然后R包keras将自动找到该安装。有关如何执行自定义安装的详细信息,请参阅链接的源。

编辑:顺便说一句,有一个类似的问题已被回答here。该海报用于更改代理设置以防止防火墙。由于活跃的赏金,我无法将此问题标记为重复。

© www.soinside.com 2019 - 2024. All rights reserved.