-
Notifications
You must be signed in to change notification settings - Fork 323
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_module_available("nevergrad") = False #817
Comments
I have also forced r-reticulate path in Rstidio GLobal Option Python page. |
Its indeed strange and disappointing. Was very eager to try Robyn. library(reticulate) usethis::edit_r_environ() reticulate:::rm_all_reticulate_state() #fixed SSL issue conda_install("r-reticulate", "nevergrad", pip = TRUE, user = TRUE) Successfully installed nevergrad-0.12.0 py_module_available("nevergrad") |
Very strange. It's kind of known that One more idea to do this: you can use the function And sorry to say this, but you also restarted the R session, right? |
Hi! Thanks for helping out! I followed all the steps - several times. My python and R environ shows nevergrad except py_config(),
NOTE: Python version was forced by RETICULATE_PYTHON |
you mentioned Demo.R is asking for nevergrad. What error is there exactly? Can you share a screenshot or so? |
Hi! Thanks for being patient. Robyn is citing lack of nevergrad for error in running
|
This error is shown when |
Thanks! Its indeed very strange. I plan to install it locally in a new laptop to test it out. |
I am also having this same problem, did you were able to correct this error? My error is the same in every detail that you put over here. |
reposting here too: one more idea #820 (comment) |
@andrewrjames in your case, you're missing numpy. please try this and let me know if it helps #820 (comment) |
hi @gufengzhou , I tried to reinstall R and Rstudio and it now works haha. |
@Tiodocafe Could you please provide more details in how you enabled it. I am using python 3.8 and R studio latest like you. |
Yes :)
In R, i have done this steps: Install reticulate first if you haven't alreadyinstall.packages("reticulate") Option 1: nevergrad installation via PIP1. load reticulatelibrary("reticulate") 2. create virtual environmentvirtualenv_create("r-reticulate") 3. use the environment createduse_virtualenv("r-reticulate", required = TRUE) 4. point Python path to the python file in the virtual environment. Below isan example for MacOS M1 or above. The "~" is my home dir "/Users/gufengzhou".Show hidden files in case you want to locate the file yourself.Sys.setenv(RETICULATE_PYTHON = "~/.virtualenvs/r-reticulate/bin/python") 5. Check python pathpy_config() # If the first path is not as 4, do 6 6. Restart R session, run #4 first, then load library("reticulate"), checkpy_config() again, python should have path as in #4.If you see: "NOTE: Python version was forced by RETICULATE_PYTHON_FALLBACK"if you're using RStudio, go to Global Options > Python, and uncheck thebox for "Automatically activate project-local Python environments".7. Install numpy if py_config shows it's not availablepy_install("numpy", pip = TRUE) 8. Install nevergradpy_install("nevergrad", pip = TRUE) After this, i have opened Rstudio and put: library("reticulate") #To confirm that everthing is alright |
Project Robyn
Describe issue: nevergrad is physically present in "r-reticulate" environment. pip command also shows present. Conda install in R also show requirement satisfied. py(config) is not showing nevergrad. Demo.R is asking for nevergrad.
Question: What else should I do to enable py_config() read nevergrad.
py_module_available("nevergrad"). FALSE
It shows TRUE for all other packages - scipy, pandas.
py_config()
python: C:/ProgramData/Miniconda3/envs/r-reticulate/python.exe
libpython: C:/ProgramData/Miniconda3/envs/r-reticulate/python38.dll
pythonhome: C:/ProgramData/Miniconda3/envs/r-reticulate
version: 3.8.18 (default, Sep 11 2023, 13:39:12) [MSC v.1916 64 bit (AMD64)]
Architecture: 64bit
numpy: C:/ProgramData/Miniconda3/envs/r-reticulate/Lib/site-packages/numpy
numpy_version: 1.24.4
NOTE: Python version was forced by RETICULATE_PYTHON
NOT SHOWING NEVERGRAD
Provide reproducible example
Sys.setenv(RETICULATE_PYTHON = "C:/ProgramData/Miniconda3/envs/r-reticulate/python.exe")
use_python("C:/ProgramData/Miniconda3/envs/r-reticulate/python.exe")
use_condaenv("r-reticulate",required = TRUE)
conda_install("r-reticulate", "nevergrad", pip = TRUE, user = TRUE) ==> Requirement satisfied 0.12.0
I have changed. Renviron
PATH="${RTOOLS42_HOME}\usr\bin;${PATH}"
RETICULATE_PYTHON="C:/ProgramData/Miniconda3/envs/r-reticulate/python.exe"
uncheck the box for "Automatically activate project-local Python environments".
Environment & Robyn version
Make sure you're using the latest Robyn version before you post an issue.
R.version$version.string: R-4.2.3
The text was updated successfully, but these errors were encountered: