New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Python Environment when using Anaconda #119
Comments
That conda env should be found when you go to use tensorflow unless you've got other things going on that cause another python environment to be found first. You can see here that the conda envs are given first priority after any explicitly requested environments (via environment variable or use_ directive): https://github.com/rstudio/reticulate/blob/master/R/config.R#L95-L107 What is the output of |
Also what's the output of:
reticulate::py_config
…On Tue, May 23, 2017 at 2:55 AM eisioriginal ***@***.***> wrote:
The library installs an Anaconda environment which must be actively set
when using the package:
#set anaconda to tensor flow environment
reticulate::use_condaenv("r-tensorflow")
This can be done via reticulate but isn't executed via the library. In
windows this prevents the library from working if r-tensorflow is not the
standard environment for Python.
Thank you very much for the great package!
Andreas
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#119>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGXx64SzZQYWCoQS31v01oqh4w38uMbks5r8oLTgaJpZM4NjQAD>
.
|
Yes, I agree, but if you are on Ubuntu it uses many libraries (sssd etc.) which require Python. In almost ever installation the system python has larger priority there. So one must actively set the Python environment beforehand. On windows it is a bit easier but if another Python was used prior to Anaconda one must set the environment actively as well. I guess adding something like: library(reticulate) to the documentation would be very helpful for the users. After that the output of py_config() looks just fine: python: /opt/anaconda3/envs/deeplearning_R/bin/python python versions found: |
Okay, added an additional note to the docs here: rstudio/reticulate@3209d85 |
Hi there ! use_condaenv("r-tensorflow") Python environments searched for 'tensorflow' package: You can install TensorFlow using the install_tensorflow() function. |
This might happen for a number of reasons:
|
Found a workaround and the actual culprit: MS Visual Studio 2017. So basically initially I installed MS VS 2017 that included Anaconda3 4.3 and I got the previous explained behavior. I uninstalled the MS VS installed Conda and I re-installed with normal 4.4 installation. After this everything worked just peachy. Obviously it is a bug within the MS VS 2017 environment/installation. So I recommend anyone who uses MS VS 2017 to install Anaconda3 separately and there will be no trouble ! |
Okay, thanks for letting us know! FWIW I just installed Visual Studio 2017 w/ Andaconda 3 4.3 and things did work as expected, so there might be some additional local configuration issues that led your environment to not work (hard to say of course as there are so many variables in play!) |
The library installs an Anaconda environment which must be actively set when using the package:
#set anaconda to tensor flow environment
reticulate::use_condaenv("r-tensorflow")
This can be done via reticulate but isn't executed via the library. In windows this prevents the library from working if r-tensorflow is not the standard environment for Python.
Thank you very much for the great package!
Andreas
The text was updated successfully, but these errors were encountered: