Add Python and uv guide#115
Conversation
|
|
||
| ### 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Good point... I've changed it slightly to match. Disappointed they were acquired by OpenAI :(
| ``` | ||
|
|
||
| ```{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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
| uv pip install sdf-xarray | ||
| ``` | ||
|
|
||
| ### Getting an error about a missing `CMAKE_C_COMPILER`? |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
What kind of machine are you on? I just tried the same and it looks like it just grabbed a binary.
There was a problem hiding this comment.
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
Add section to make this more friendly for physicists to install.