在Anaconda下为RStudio设置python

时间:2019-01-03 19:53:20

标签: python anaconda rstudio

在Anaconda中从RStudio运行install_keras时,无法更改正在使用的python

我在Windows 10盒子上安装了多个版本的Python:Python 2.7,Python 3.6,以及似乎已经与Anaconda一起安装的python。我通过Anaconda安装了RStudio。

我正在尝试在我的R代码中使用keras库。我运行“ install_keras()”并收到以下错误:

Error: Error 1 occurred while checking for python architecture
In addition: Warning message:
running command '"C:\Python27\/python.exe" -c "import sys; import platform; 
sys.stdout.write(platform.architecture()[0])"' had status 1  

我尝试使用方法和conda设置运行install_keras:

install_keras(method="conda", conda="C:/Development/Anaconda35/Scripts")

但是我仍然遇到相同的错误。我还尝试使用Sys.setenv和use_python()重置PATH和RETICULATE_PYTHON环境变量,但这似乎无济于事。

Sys.which('PYTHON')确实显示了我要使用的正确可执行文件。

是的,我的环境变量确实在路径中首先设置了Python。但是改变这一点似乎没有帮助。

我尝试卸载并重新安装keras,包括R库和'conda'(pip)python库。那没有帮助。

我现在假设此设置中包含一些配置或设置文件,但是我似乎找不到它。

建议?

0 个答案:

没有答案