On Wednesday, March 12th, 2025 at 9:04 AM, Tracker <lambdatro...@disroot.org>
wrote:
>
>
> Gary Johnson lambdatro...@disroot.org writes:
>
> > > Hi folks,
> > >
> > > I ran across a situation today in which I needed a newer version of
> > > Python than what is provided via the `python` package in Guix main
> > > (version 3.10.7).
> > >
> > > Fortunately, Guix does have a `python-next` package (version 3.12.2) that
> > > is sufficiently up-to-date for my needs.
> > >
> > > Unfortunately, I also need some Python libraries installed along with it,
> > > and this makes the problem much more challenging.
>
>
> Michael Dahlberg dahlberg+g...@recursoft.org writes:
>
> > Might I suggest not touching the system python version or its provided
> > collection of libraries? Instead use UV
> > (https://github.com/astral-sh/uv) to create the exact needed python
> > development environment with the exact set of neccessary libraries.
> > Creation of a virtual environment in this manner is a much better
> > solution than trying to bend the system environment to your will.
> > Also, much less frustrating!
> >
> > Just my suggestion.
> >
> > Mike
>
>
> Thanks for the idea, Mike. I don't see a Guix package for uv though. Do you
> have one handy? ;)
>
> Thanks,
> Gary
Hi Gary:
I don't believe Guix has packaged it (yet). From their Github page you can
either use pip to install it:
pip install uv
(
since you're on Guix, I'd probably install it so that its local to just your
account:
pip install --user uv
)
or use their installer:
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
My recommendation would be to go with their installer since you can easily
update it after installing it using:
uv self update
uv is under very active development and they are very responsive to bugs and
feature requests, so its a good idea to keep it updated on a regular basis.
As an aside, RealPython interviewed the creator of UV, Charlie Marsh and this
screencast is really good. It talks a lot about the capabilities of uv and how
it accomplishes them. From what I've seen, uv is SO good that pretty much the
entire python ecosystem is moving to it as the default package manager for
python.
Hope this helps!
Mike