Skip to content

Add web article: R and GDAL in conda#980

Merged
ctoney merged 1 commit into
firelab:mainfrom
ctoney:conda_howto
May 17, 2026
Merged

Add web article: R and GDAL in conda#980
ctoney merged 1 commit into
firelab:mainfrom
ctoney:conda_howto

Conversation

@ctoney
Copy link
Copy Markdown
Member

@ctoney ctoney commented May 17, 2026

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

@ctoney ctoney merged commit dc5ada6 into firelab:main May 17, 2026
7 checks passed
@ctoney
Copy link
Copy Markdown
Member Author

ctoney commented May 17, 2026

@conda-forge/r , @matthewfeickert -
Hi. I added the article linked above to the gdalraster website, in case you might be interested to take a look. It would benefit from at least a quick check by a subject matter expert, i.e., primarily the first few sections through "Creating a new environment for R". Any comments, corrections or edits would be welcome.

Thanks!

Copy link
Copy Markdown
Contributor

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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))].
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +76 to +79
```bash
conda create -c conda-forge -n r_env r-base r-essentials r-gdalraster
conda activate r_env
conda list
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,<3

and 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.

@ctoney
Copy link
Copy Markdown
Member Author

ctoney commented May 18, 2026

@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.

@mdsumner
Copy link
Copy Markdown
Collaborator

I discovered pixi in rasterix a few days ago

🙏 No point, just saying 😁

@ctoney
Copy link
Copy Markdown
Member Author

ctoney commented May 18, 2026

@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.

@matthewfeickert
Copy link
Copy Markdown
Contributor

matthewfeickert commented May 18, 2026

I see Pixi mentioned all the time but never actually used it. Their documentation is very good.
...
yeah I didn't even know that's what Pixi does

@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.

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.

No promises here, but this is another area that I would recommend asking for help on the conda-forge Zulip server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants