{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/reticulate/issues/292","repository_url":"https://api.github.com/repos/rstudio/reticulate","labels_url":"https://api.github.com/repos/rstudio/reticulate/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/reticulate/issues/292/comments","events_url":"https://api.github.com/repos/rstudio/reticulate/issues/292/events","html_url":"https://github.com/rstudio/reticulate/issues/292","id":334585216,"node_id":"MDU6SXNzdWUzMzQ1ODUyMTY=","number":292,"title":"use_condaenv() never uses the specified environment","user":{"login":"micdonato","id":36861962,"node_id":"MDQ6VXNlcjM2ODYxOTYy","avatar_url":"https://avatars1.githubusercontent.com/u/36861962?v=4","gravatar_id":"","url":"https://api.github.com/users/micdonato","html_url":"https://github.com/micdonato","followers_url":"https://api.github.com/users/micdonato/followers","following_url":"https://api.github.com/users/micdonato/following{/other_user}","gists_url":"https://api.github.com/users/micdonato/gists{/gist_id}","starred_url":"https://api.github.com/users/micdonato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micdonato/subscriptions","organizations_url":"https://api.github.com/users/micdonato/orgs","repos_url":"https://api.github.com/users/micdonato/repos","events_url":"https://api.github.com/users/micdonato/events{/privacy}","received_events_url":"https://api.github.com/users/micdonato/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-06-21T17:20:14Z","updated_at":"2018-06-26T21:54:25Z","closed_at":null,"author_association":"NONE","body":"Hello, \r\n\r\nI've been trying to use reticulate with my conda environments, but it seems that I am not able to load the right environment.\r\n\r\nNo matter what I put into `use_condaenv()` I always end up with the base conda python version.\r\n\r\nThis is what I am trying:\r\n\r\nOn the server:\r\n\r\n```\r\n[user@server-rstudio1 ~]$ which python\r\n~/anaconda2/bin/python\r\n[user@server-rstudio1 ~]$ python\r\nPython 2.7.14 |Anaconda custom (64-bit)| (default, Mar 27 2018, 17:29:31) \r\n[GCC 7.2.0] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import umap\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nImportError: No module named umap\r\n>>> \r\n[user@server-rstudio1 ~]$ source activate py27\r\n(py27) [user@server-rstudio1 ~]$ which python\r\n~/anaconda2/envs/py27/bin/python\r\n(py27) [user@server-rstudio1 ~]$ python\r\nPython 2.7.14 |Anaconda, Inc.| (default, Dec  7 2017, 17:05:42) \r\n[GCC 7.2.0] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import umap\r\n>>> \r\n(py27) [user@server-rstudio1 ~]$ \r\n```\r\n\r\nAs you can see, the base python (in `~/anaconda2/bin/python`) doesn't have the `umap` package installed, while the python in `~/anaconda2/envs/py27/python` does.\r\n\r\nWhen I open RStudio, I try:\r\n\r\n```\r\nlibrary(reticulate)\r\nconda_list()\r\nuse_condaenv(condaenv = 'py27', required = TRUE)\r\n# commented here because I tried a few options\r\n# use_condaenv(condaenv = '/home/user/anaconda2/envs/py27', required = TRUE)\r\n# use_condaenv(condaenv = '/home/user/anaconda2/envs/py36', required = TRUE)\r\n# use_condaenv(condaenv = '/home/user/anaconda2/envs/py27')\r\n# use_condaenv(condaenv = '/home/user/anaconda2/envs/py36')\r\nnumpy <- import('numpy')\r\numap <- import('umap')\r\n\r\npy_config()\r\n\r\nsystem('which python')\r\n```\r\n`conda_list()` correctly shows all my conda environments.\r\n\r\nNo matter what I put into `use_condaenv()` what I get from py_config is:\r\n\r\n```\r\npython:         /home/user/anaconda2/bin/python\r\nlibpython:      /home/user/anaconda2/lib/libpython2.7.so\r\npythonhome:     /home/user/anaconda2:/home/user/anaconda2\r\nversion:        2.7.14 |Anaconda custom (64-bit)| (default, Mar 27 2018, 17:29:31)  [GCC 7.2.0]\r\nnumpy:          /home/user/anaconda2/lib/python2.7/site-packages/numpy\r\nnumpy_version:  1.13.3\r\nnumpy:          /home/user/anaconda2/lib/python2.7/site-packages/numpy\r\n\r\npython versions found: \r\n /home/user/anaconda2/bin/python\r\n /usr/bin/python\r\n /home/user/anaconda2/envs/tensorflow/bin/python\r\n /home/user/anaconda2/envs/py27/bin/python\r\n /home/user/anaconda2/envs/py36/bin/python\r\n /home/user/anaconda2/envs/r_env/bin/python\r\n```\r\n\r\nAnd since `umap` is installed only on `py27`, I cannot load it with reticulate.  \r\nAny idea of what I am doing wrong?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rstudio/reticulate/issues/comments/400475411","html_url":"https://github.com/rstudio/reticulate/issues/292#issuecomment-400475411","issue_url":"https://api.github.com/repos/rstudio/reticulate/issues/292","id":400475411,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDQ3NTQxMQ==","user":{"login":"jjallaire","id":104391,"node_id":"MDQ6VXNlcjEwNDM5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/104391?v=4","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T21:54:25Z","updated_at":"2018-06-26T21:54:25Z","author_association":"MEMBER","body":"No, it's a global setting. RStudio Server Pro has support for the PAM session API, which you could use to implement user-specific LD_LIBRARY_PATH. I noted that your GitHub affiliation lists Stanford University -- RStudio Server Pro is free for teaching and 1/2 price for academic research if that helps here."}}
{"actor":{"display_login":"jjallaire"}}