Add web article: R and GDAL in conda#980
Conversation
|
@conda-forge/r , @matthewfeickert - Thanks! |
matthewfeickert
left a comment
There was a problem hiding this comment.
@ctoney the conda-forge/r team only exists inside of the conda-forge GitHub organization, so tagging them here won't alert them. My recommendation for getting feedback is that you share this on the conda-forge Zulip #general channel: https://conda-forge.zulipchat.com/
|
|
||
| DRAFT: last updated 2026-05-17 | ||
|
|
||
| Conda is an open-source, cross-platform, language-agnostic package manager and environment management system. It was originally developed to solve package management challenges faced by Python data scientists, and today is a popular package manager for Python and R [[Wikipedia](https://en.wikipedia.org/wiki/Conda_(package_manager))]. |
There was a problem hiding this comment.
Conda is one option of software for conda package resolution and installation. I would instead focus on conda packages and then mention there are multiple options of environment managers to use. I prefer Pixi and think that is probably more approachable for most people who are new to the ecosystem.
Conda packages cover a wide selection of programming languages, including C, C++, Fortran, Rust, Go, Python, and R. It is a general purpose packaging format.
| ```bash | ||
| conda create -c conda-forge -n r_env r-base r-essentials r-gdalraster | ||
| conda activate r_env | ||
| conda list |
There was a problem hiding this comment.
With Pixi this is
$ pixi init example && cd example
$ pixi add r-essentials r-gdalraster
Added r-essentials >=4.5,<5
Added r-gdalraster >=2.6.1,<3and the you can either use pixi run to execute commands or pixi shell to get an interactive shell with the environment activated. You also get a digest-level lock file automatically, so the environment is fully reproducible.
|
@matthewfeickert thanks for the feedback. This is very helpful. I see Pixi mentioned all the time but never actually used it. Their documentation is very good. I'm interested to explore that and try my example with Pixi. I'll do some revisions in the next day or so based on your comments and then share on Zulip. |
|
I discovered pixi in rasterix a few days ago 🙏 No point, just saying 😁 |
|
@mdsumner, yeah I didn't even know that's what Pixi does 😄 I'm having more appreciation for the conda ecosystem as Pixi explains it. It's unfortunate that we don't have conda-forge builds working for Windows. Daniel Nachun of the conda-forge/r team got builds working for sf, but the same approach was not successful for terra. I tried to replicate his approach with gdalraster but only reached the same failure point he got to with terra: conda-forge/r-gdalraster-feedstock#13 (comment) I haven't had the time to work on it more and was prioritizing the CRAN build system for a while. Nevertheless, conda-forge is a great way to get current GDAL with Arrow/Parquet in R on Linux. It's relatively accessible and lightweight compared with Docker so more suitable for end use plus environments etc. |
@ctoney I would refer to the Pixi docs, as you mentioned, for getting started examples and tutorials. They are well maintained and always up to date. I will also mention (as I am biased) that I spun the first section of my The Carpentries Incubator lesson/workshop/course on Reproducible Machine Learning Workflows for Scientists into an Introduction to Pixi lesson. It may or may not be helpful for you, but I would welcome any critique on it if you find parts useful. I'll note that when I taught workshops from these materials we had R-users in attendance (not just Python users). One of those people (who hopefully won't mind the noise of me tagging them) was @kerchner, who recently gave the talk: Pixi: Fast, reproducible environments for Python, R and more without the headaches at The George Washington University's Second Annual Open Source Conference (OSCON) 2026. He may have thoughts to share for fellow R users.
No promises here, but this is another area that I would recommend asking for help on the conda-forge Zulip server. |
Merged for rendering but labelled as DRAFT for now. The DRAFT label will be removed after further review and potential revisions.
Will be rendered at: https://firelab.github.io/gdalraster/articles/r-and-gdal-in-conda.html