You are not logged in.

#1 2025-03-30 08:02:51

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Should I install pyenv from the official installer or from pacman?

I am new to Arch Linux, and I am setting up my development environment. I use `pyenv` to manage Python installations. On other Linux distros, as well as on my MacBook, I'd usually use the official installer of pyenv: https://github.com/pyenv/pyenv?tab=read … ecommended. However, I also have the option to install the pyenv package (https://archlinux.org/packages/extra/any/pyenv/).
I am not sure which method I should choose to install pyenv. In general, there are many packages that provide their own installers (rustup, julia and starship to name a few). Should I use the official install scripts of such packages or install them with pacman or from the AUR?
The pyenv repo doesn't mention anything about the Arch package, and the Arch package doesn't mention anything about the official installer (except for linking to the original repo, of course), so I am really confused. If I install pyenv with pacman, should I follow the rest of the instructions of the pyenv installation: https://github.com/pyenv/pyenv?tab=read … pendencies, or does pacman install these dependencies for me? These dependencies aren't listed in the pyenv package of Arch (why?), so I guess I should install them too, but I wanted to confirm. I tried to search the ArchWiki and the Internet, but couldn't find any recommendations to use the Arch package or the official installer, so I am asking it here.

Offline

#2 2025-03-30 15:45:24

mackin_cheese
Member
Registered: 2025-01-07
Posts: 475

Re: Should I install pyenv from the official installer or from pacman?

When in doubt,  always go with Pacman.

Offline

#3 2025-03-30 21:49:20

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 713

Re: Should I install pyenv from the official installer or from pacman?

If you just want to install various python versions then the modern best way to do it is to use `uv`, e.g. `uv python install 3.12`.

However, if you only want those versions to use with virtual environments then you don't even need to do that. Just `uv venv -p 3.12` and uv will install the python "on the fly" as it creates the `.venv`. All happens eons faster than `pyenv`.

Offline

#4 2025-03-31 07:04:53

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Should I install pyenv from the official installer or from pacman?

I actually use `uv` in my workflow as well. I just don't like Astral's Python distributions, so I use `pyenv` to manage Python installations, and I configure `uv` to never download Python automatically and use it to manage virtual environments, projects, tools, scripts, etc.
However, `uv` causes me the same confusion `pyenv` does with regards to installation on Arch. I can install the `uv` package with `pacman` or use the official install script of `uv`, and I don't know which one I should choose.

With regard to `uv`, there are two more questions I have:

  1. There is the package `uv` and the package `python-uv`. Which one I should install if I choose to go with `pacman`?

  2. The `uv` and `python-uv` packages are flagged as out of date, and indeed their version is 0.6.10 while the latest version of `uv` is 0.6.11. Why are these packages out of date (I thought one of the main points of Arch Linux is to have the latest software), and when can I expect them to catch up to the latest version of `uv`?

Offline

#5 2025-03-31 09:49:21

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 713

Re: Should I install pyenv from the official installer or from pacman?

1. `uv` is the main package and the one you should install. It contains the command line program `uv` (and `uvx`) which you run directly. `python-uv` is a sub-package that packages a wrapper for python apps and is required by some external tools, e.g `python-hatch` is one example that uses this. You don't need to install it.
2. The `uv` project is extremely active. They make a new release every few days so there is always a small latency in Arch releases and it means the `uv` package is pretty much nearly always nominally "out of date".

I use the `uv` installer script because I am very invested in the `uv` project so I read every new release email and want to update immediately (which is just a simple `uv self update` command). `uv` is a self contained rust binary which is pretty much insulated from the rest of your system so in this case that approach is valid. However for most users the Arch package is probably best since it gets updated with everything else when you `pacman -Syu` and for most users that small delay in the official release is inconsequential and arguably even desirable.

Offline

#6 2025-04-01 07:49:30

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Should I install pyenv from the official installer or from pacman?

I tried to install `uv` with pacman, but it failed saying it couldn't retrieve files sad

resolving dependencies...
looking for conflicting packages...

Packages (1) uv-0.6.10-1

Total Download Size:   10.94 MiB
Total Installed Size:  39.32 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 uv-0.6.10-1-x86_64.pkg.tar.zst failed to download
error: failed retrieving file 'uv-0.6.10-1-x86_64.pkg.tar.zst' from archlinux.interhost.co.il : The requested URL returned error: 404
error: failed retrieving file 'uv-0.6.10-1-x86_64.pkg.tar.zst' from archlinux.interhost.co.il : The requested URL returned error: 404
error: failed retrieving file 'uv-0.6.10-1-x86_64.pkg.tar.zst' from mirror.isoc.org.il : The requested URL returned error: 404
error: failed retrieving file 'uv-0.6.10-1-x86_64.pkg.tar.zst' from archlinux.mivzakim.net : The requested URL returned error: 404
error: failed retrieving file 'uv-0.6.10-1-x86_64.pkg.tar.zst' from mirror.isoc.org.il : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

Offline

#7 2025-04-01 08:33:03

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 713

Re: Should I install pyenv from the official installer or from pacman?

That has nothing to do with `uv` or `python` or the subject here. You have a problem with your system or mirrors.

Whenever you paste error output from your terminal, always include the initiating command. Otherwise we have to guess what you typed.

Can you ping google.com? Have you updated your system? Can you install anything else with pacman? Have you tried other mirrors (other than those in Israel)?

Offline

#8 2025-04-01 08:43:54

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Should I install pyenv from the official installer or from pacman?

The command I typed was simply `sudo pacman -S uv`. The internet works and I am able to ping google.com. I updated the system and I was able to install other packages with pacman such as pyenv, starship, stow, etc.
I didn't try other mirrors, and I am not sure which mirrors to use if not those closest to me geographically.
Why is it even the case that some mirrors have the packages I want and some don't? I thought the idea of mirrors was to simply select the closest ones to me geographically, so I get the fastest download speeds, but other than that mirrors should be equivalent.

Please tell me if I should make a new post about this issue, and if you have links explaining how I should post here on the forums. As stated before, I am new to Arch Linux.

Offline

#9 2025-04-01 09:37:33

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,408
Website

Re: Should I install pyenv from the official installer or from pacman?

You're getting a 404 because the uv package has been updated to 0.6.11. Run a full system update and install uv alongside that.

# pacman -Syu uv

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#10 2025-04-01 17:18:08

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Should I install pyenv from the official installer or from pacman?

I did `pacman -Syu` and then `pacman -S uv` and it worked. It also solved another package that gave me the same errors when I tried to install it. I am a bit surprised since I updated the system just yesterday. It's incredible how fast these updates come in.

Offline

Board footer

Powered by FluxBB