-
Notifications
You must be signed in to change notification settings - Fork 328
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
Error in GitHub Action Virtualenv_create with R-devel and Reticulate #1544
Comments
Thanks for reporting. I beleive the development version of reticulate already has a fix for the latest r-devel. Do you still see the error if you install reticulate from main branch? We'll have a new CRAN release in a few weeks time. |
Thanks for that advice. I re-ran on GHA with reticulate from github and everything ran correctly. For others who may experience the same issue and want to use reticulate from github instead of CRAN, I added the following lines before my setup-reticulate step (after
|
I am seeing the same error (in an Ubuntu 24.04 container) with version 1.39.0 which should have the fix. Any idea? I installed packages
|
Thanks for reporting. It looks like there are two stray Line 453 in 74627cd
However, those lines of code are only evaluated when we're already composing a nicer error message because |
So I was trying to get a minimal environment going when batch package building. The displayed Could it be that we are running into subtle 'focal vs jammy' differences? |
Getting closer, thanks to your fine and focussed commit I was able to poke. I think the first test passes root@78709e774099:/# Rscript -e 'reticulate:::python_has_module("/usr/bin/python3", "pip")'
[1] TRUE
root@78709e774099:/# but the second was not testing for (This was after apt update -qq; apt install r-cran-reticulate python3-pip python3-dev python3-venv python-is-python3 in a |
The only other thing I could think of is that this Line 436 in 74627cd
However, I tried in docker containers derived from both |
Yes that works here too. (Same 22.04 container I still had open) root@78709e774099:/# Rscript -e 'any(grepl("\\bpython[0-9.]*-venv\\b", system("dpkg -l", intern = TRUE)))'
[1] TRUE
root@78709e774099:/# |
If you can share a Dockerfile where |
Hm, that command works (after |
And the same command I ran a few comments and hours earlier, ie from inside R, now also works. I must have been missing |
Thanks. I just pushed an update to improve the error message and mention |
I presume I could iterate and try to find the minimal set that let's us build the required venv. (One thing, by the way, I was thinking but have been able to check with your code. Would having an env that auto-creates the default venv if missing be helpful?) |
Do you mean something like this? reticulate:::.onLoad <- function(...) {
...
if (!virtualenv_exists("r-reticulate") &&
!is.null(virtualenv_starter())
virtualenv_create()
} |
Yep, pretty much. Because right now what happens is
Obviously, I can jump in and create it for the builds that need it (now that I know the missing ingredients) but it would be simpler if the needed step was executed auto'magic'ally. |
Hello, we have a recurrent error with reticulate for rdevel on ubuntu in our github action:
https://github.com/SCasanova/f1dataR/actions/runs/8149812048/job/22275075253
In particular, trying to create a virtualenv causes the following error:
Other versions of R on the same platform (release and oldrel) and with specified (3.11) or generic (3.x) versions of python pass.
R-Devel on other platforms (windows-latest/macos-latest) with specified (3.11) or generic (3.x) versions of python fail.
Code suffering the error:
The text was updated successfully, but these errors were encountered: