-
Notifications
You must be signed in to change notification settings - Fork 327
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
py_install() hardwires the paths for virtualenv instead of following PATH #499
Comments
Digging into the
Is there a reason why Also, here's
Thanks! |
@cboettig There's a general problem that R isn't configured to see You can test this out by comparing some results with |
I think this issue should be resolved now -- we no longer use |
Thanks @kevinushey , things are so much better with the current github version than the current CRAN version (1.15). I still cannot switch between two different virtualenvs in the same R session: library(reticulate)
## Set up two separate virtualenvs
virtualenv_install(envname="/opt/venv/tf1",
packages = c("tensorflow==1.14.0",
"tensorflow_probability==0.7.0") )
virtualenv_install(envname="/opt/venv/tf2",
packages = c("tensorflow==2.0.0") )
## we can successfully switch into venv 1:
use_virtualenv("/opt/venv/tf1")
tensorflow::tf_version()
## but then we're stuck with it until we restart the R session
## no warning or error message that we're still in the former env
use_virtualenv("/opt/venv/tf2")
tensorflow::tf_version() Let me know if this would be better put in a different thread. |
I'm confused -- the current CRAN version basically is the GitHub version right now? The issue you indicate is known, though -- Python can only be initialized once per session; if you want to re-initialize Python with a new virtual environment you need to restart R. |
Thanks @kevinushey , I was a release behind on CRAN. Re virtualenv, thanks, that makes sense as well. Would it be possible for |
This is the behavior of |
Makes sense, thanks for the reply and sorry I didn't get that earlier! |
Here's a reprex:
Created on 2019-05-12 by the reprex package (v0.2.1)
Not clear to me why py_install believes virtualenv is not installed. Testing this on Debian 9 with this setup
The text was updated successfully, but these errors were encountered: