Skip to content

Add Python and uv guide#115

Merged
JoelLucaAdams merged 5 commits intomainfrom
Python-guide
Apr 8, 2026
Merged

Add Python and uv guide#115
JoelLucaAdams merged 5 commits intomainfrom
Python-guide

Conversation

@JoelLucaAdams
Copy link
Copy Markdown
Collaborator

Add section to make this more friendly for physicists to install.

Comment thread docs/getting_started.md Outdated

### Installing uv

We recommend [installing uv](https://docs.astral.sh/uv/getting-started/installation/) which is a command line tool that can install both Python versions and packages. This tool is the current industry standard and additionally has the benefit of being significantly faster than other tools.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure I agree that it's industry standard, and given Astral were recently bought out by OpenAI, it's future is fairly uncertain right now. But it is a very highly rated tool that has eclipsed poetry/hatch/etc in the community, and personally I'm still recommending it for now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point... I've changed it slightly to match. Disappointed they were acquired by OpenAI :(

Comment thread docs/getting_started.md
```

```{tab-item} Windows
If you've encountered this error then I have no idea... But I strongly recommending installing [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install) and running a mini Ubuntu install on your machine instead of fighting windows.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Honestly, fair 😆

Last time I ran into this myself I had a pretty good time with Chocolatey, but even then, it was still rough compared to doing anything in Linux.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Interesting... not heard of that one before but that's really cool! Still going to leave it as is. Not my monkey, not my circus lmao

Comment thread docs/getting_started.md
uv pip install sdf-xarray
```

### Getting an error about a missing `CMAKE_C_COMPILER`?
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this error popping up for people because they're having to install from sdist? I thought we were distributing binaries with cibuildwheel. If so, it would be good to know which OS/architectures/Python versions we're missing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I tested this by spinning up a fresh docker container with an Ubuntu image and following the steps listed in the code including installing python3.14 via uv Maybe installing from apt installs the necessary components? Didn't work until I installed the build-essential for gcc support.

I've really not done a deep dive into how binaries are built/distributed so I have no idea what needs to be done in order to check/fix this. I was hoping you'd be able to help

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What kind of machine are you on? I just tried the same and it looks like it just grabbed a binary.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Curious... I have docker desktop installed and ran this using the steps I listed in the above comment in the hope of replicating a "clean" and fresh OS. I've encountered this error before when installing on other machines so I don't see any problem in leaving it in but at the same time if there's something that needs fixing we should look into it

@JoelLucaAdams JoelLucaAdams merged commit 0099827 into main Apr 8, 2026
15 checks passed
@JoelLucaAdams JoelLucaAdams deleted the Python-guide branch April 8, 2026 10:49
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.

2 participants