Skip to content
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

Can't load venvs that aren't in ~/.virtualenvs #74

Closed
stulacy opened this issue Jun 28, 2017 · 1 comment
Closed

Can't load venvs that aren't in ~/.virtualenvs #74

stulacy opened this issue Jun 28, 2017 · 1 comment

Comments

@stulacy
Copy link

stulacy commented Jun 28, 2017

I've placed my virtual environments in a different folder (~/virtualenvs as I dont' want them hidden) to the default (~/.virtualenvs), but I'm having problems getting them to load in reticulate.

Running use_virtualenv("~/virtualenvs/foo", required=T") works fine, but it evidently hasn't loaded as when I try to use packages that are only installed in this venv they can't load.

Running py_config() only displays the virtual environments that I have still in the default folder, but after running the use_virtualenv() call py_discover_config() correctly indicates that it's found the virtual env.

My WORKON_HOME is correctly set to ~/virtualenvs but it doesn't appear that this is being picked up by reticulate. From the code, it seems that this is hardcoded in R/config.R on line 110, rather than picking up WORKON_HOME.

@jjallaire
Copy link
Member

I just added support for WORKON_HOME (didn't know about that, thanks for the tip!)

In terms of why it's not binding to the environment specified in use_virtualenv, the behavior of the package is that upon the first call to import we scan all versions of Python we can find for the package being imported. The version you specified in use_virtualenv("~/virtualenvs/foo", required=T") is being scanned first, however for whatever reason it's not finding the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants