-
Notifications
You must be signed in to change notification settings - Fork 330
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
Prompting user input #1644
Comments
That code is only executed in interactive sessions. See just one line above Lines 475 to 476 in d683b3b
What is the problem or error you are encountering? |
Hi, thanks for quick response. The problem is that I have OS python and I do not want any virtual python environment at all. And each time when I restart R session and executing: reticulate::py_available(initialize = TRUE), I have to answer question "Would you like to create a default Python environment for the %s package?", since each time I am saying "No". Don't you think it is annoying? I have found a solution: Sys.setenv(RETICULATE_AUTOCREATE_PACKAGE_VENV = 0) But I do not like it either, since I have to deal with some unknown environment variable. Therefore I am asking please change the logic. It is very strange behavior and I spent whole day understanding it. |
And about other issue, I think it is not related to this directly. Any environment variable must be well-documented and has solid use case. Otherwise, one can invent as much as he wants and that will over-complicate the code. And because of that, I am asking please please remove that environment variable. Thanks again. |
If you have a strong preference for which Python you want reticulate to use, I suggest setting the environment variable export RETICULATE_PYTHON=/usr/bin/python Or in Sys.setenv("RETICULATE_PYTHON" = "/usr/bin/python") I agree that reticulate should remember if the user declined to create the venv and not ask again. That said, the default is the default because it leads to the most consistently positive experience for users. Defaulting to the system python leads to problems when you begin installing packages - it often results to a very broken installation with no easy way to revert to a working state, especially for novices to Python installation management. I encourage you to accept the prompt and let reticulate default to using the You may also want to look at the "Order of Discovery" to understand how reticualte selects a Python installation to bind to. https://rstudio.github.io/reticulate/articles/versions.html#order-of-discovery |
Hi, let me do not accept with such a workaround. You again try to convince me that environment variable is a good approach. And one has to define environment variable $A or $B to make a module work as it is intended to work. Again, I think makes very hard to follow the idea for new user. Why just do not add a new parameter to a function? It is more easy to implement and easy to document. And environment variable definition depends on OS and sometimes one has to restart server to make them work. And defining environment variables for Windows OS is really nightmare. My idea is simple. Just add a new parameter to skip creating mandatory python virtual environment and remove some useless environment variables. Usage of environment variable must be exceptional, only for the cases when other approaches do not work at all. Thank you for your time and readiness to help. Regards, |
reticulate/R/config.R
Line 476 in d683b3b
Please remove this logic. In case of non-interactive session initialization of python for most cases would fail, even if there are Python installed on the OS.
The text was updated successfully, but these errors were encountered: