-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Python Path in R is missing /site-packages/
for Ubuntu 24.04 and Python 3.12
#11137
Comments
Hi @glatterf42 Thank you for bringing this issue to our attention. We are looking into this issue and will update you on this issue after investigating. |
Hi @glatterf42 Could you please try the workaround below, I hope it will work for this issue. Thanks. From my side, |
Hi @RaviAkshintala, thanks for providing this workaround! I must say that I'm not sure how this made your workflow pass, but I'm glad there is a lead :) |
@glatterf42 Could you please try to add a step to Example:
|
Unfortunately, this does not work at all, it gives me this error in the Error: Error: unexpected symbol in "pip install"
Execution halted
Error: Process completed with exit code 1. |
@glatterf42 I tried with the below steps , It is working for me. Could you please try from your side.
|
Thanks for your many suggestions :)
|
Description
This is related to #10636 and possibly #10781.
This weekend, our CI started failing on Ubuntu with this error message:
This is the same error message as we encountered the first time that
ubuntu-latest
was upgraded to Ubuntu 24.04. Back then, I opened an issue with IRkernel and r-lib, where I summarized the issue in detail and what I tried to work around it. In essence, the issue seems to be that the Python path inside of ourRscript
step is not correct onubuntu-latest-py3.12
: the.../site-packages/
directory is missing. If I runjupyter kernelspec --version
immediately before startingRscript
, the Python path is fine and the command exits without errors.I am still not sure what's causing this behavior. Ubuntu 24.04 removed the pre-installed R version, but we're using the latest version of the r-lib/setup-r action, anyway. In the meantime, we started supporting Python 3.13, though, and the same error does not appear there (or on Python 3.11, for that matter; unfortunately, I don't remember if that was the case in October, too). You can see this in the CI of another of our repos: this issue only seems to affect Ubuntu 24.04 and Python 3.12.
With this information, we can already find workarounds (e.g. only use Ubuntu 22.04 for Python 3.12), but I still think this bug should be reported and resolved, if you can. Thanks for your efforts :)
Platforms affected
Runner images affected
Image version and build link
Version: 20241201.1.0
Link (again): https://github.com/iiasa/message_ix/actions/runs/12229324988
Is it regression?
No, the last successful run used Image: ubuntu-22.04 Version: 20241201.1.0.
Expected behavior
The Python path should be the same inside of
Rscript
as well as outside so thatjupyter
is recognized properly.Actual behavior
.../site-packages/
is missing from the path, sojupyter
is not found and the command exits with an error.Repro steps
Please find our workflow file here: https://github.com/iiasa/message_ix/blob/main/.github/workflows/pytest.yaml
If you run the steps in the
tutorials
workflow, the stepInstall R dependencies and tutorial requirements
will fail with the error message above using the Ubuntu 24.04 version given above and Python 3.12.The text was updated successfully, but these errors were encountered: