Dev

uv on Fedora 45 / 44: Python Interpreters, Venvs and Projects

The uv you install with dnf on Fedora is not the uv that Astral’s documentation describes. Fedora’s package drops a system config file into /etc/uv/uv.toml that turns off automatic Python downloads and tells uv to prefer the system interpreter. Commands copied from upstream tutorials therefore fail on a fresh Fedora box with an error about downloads being “manual”.

Original content from computingforgeeks.com - post 189880

That file also follows you when you install uv from PyPI, and it explains most of the surprises with uv on Fedora. It is why uv venv ignores a managed Python you just installed, and why a pin to an older interpreter gets rejected. A legacy package that fails with No module named 'pkg_resources' is a separate story about setuptools, covered at the end. Everything below was run on Fedora 45 and Fedora 44 in November 2026, with uv 0.13.5 from the Fedora repos, Python 3.15.2 as the Fedora 45 system interpreter and 3.14.10 on Fedora 44.

Fedora’s uv package carries its own config

uv is in the main Fedora repositories, so one dnf transaction installs it with jemalloc as its only extra dependency. dnf picks the newest build across the enabled repos, so the updates repo wins over the older uv in the base repo without any extra flag. If you are on Fedora 44 and planning the Fedora 44 to 45 upgrade, the uv config you meet here is the same on both releases.

sudo dnf install -y uv

On the Fedora 45 lab VM the package came from the updates repo, and the transaction held two packages in total.

Installing:
 uv       x86_64 0:0.13.5-3.fc45 updates     40.7 MiB
Installing dependencies:
 Installing:         2 packages

Now ask rpm who owns the system config file, then strip its comments so only the active settings remain. Run uv self update once as well, because its answer tells you how uv gets updated from here on. None of the three commands changes anything, so they’re safe on a machine you share.

rpm -qf /etc/uv/uv.toml
grep -v "^#" /etc/uv/uv.toml | grep .
uv self update

Fedora’s uv package owns the file, and it sets three values that differ from upstream defaults. The self updater won’t replace a binary that dnf manages, so your updates arrive through sudo dnf upgrade uv and nothing else.

Fedora 45 uv package owns /etc/uv/uv.toml with python-downloads manual, python-preference system and system-certs true

Each setting changes one behaviour you would otherwise take for granted from the upstream docs:

  1. python-downloads = "manual": uv never fetches an interpreter on its own
  2. python-preference = "system": /usr/bin/python3 wins over any managed build
  3. system-certs = true: TLS trust comes from Fedora’s CA store, not uv’s bundle

Fedora’s reasons sit in the comment block above those lines. The packagers want you on RPM-built Pythons that receive distribution security fixes, and they did not want an old managed build to become the default just because it was installed. They also leave the door open: a user or project config can override any of the three, so the defaults are a starting point rather than a lock.

Python downloads stay off until you ask

On a stock Fedora 45 install, uv sees exactly one interpreter: the system Python behind /usr/bin/python3. Asking for any other version fails instead of downloading, and the hint in the error names the setting that blocked it.

uv python list
mkdir -p ~/py312 && cd ~/py312
uv venv --python 3.12
uv python install 3.13

Your venv request dies with “Python downloads are set to ‘manual'”. The explicit uv python install is allowed, because manual mode only blocks implicit downloads, and it finished in under two seconds.

uv venv --python 3.12 fails on Fedora 45 because Python downloads are set to manual, then uv python install 3.13 downloads a managed build

So you have two ways to satisfy a version request, and they land in very different places:

  • sudo dnf install python3.12: Fedora build in /usr/bin, patched by dnf
  • uv python install 3.13: standalone build in ~/.local/share/uv/python, updated only through uv

Fedora expects the RPM route, so try it with the version that just failed. You don’t change the venv command at all, because uv searches /usr/bin before it even considers a download. The interpreter you end up with then gets its fixes from dnf like the rest of the system.

sudo dnf install -y python3.12
uv venv --python 3.12

With the RPM in place, uv finds it on the search path and the request that failed a minute ago succeeds without a download.

Using CPython 3.12.16 interpreter at: /usr/bin/python3.12
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

Prefer the RPM whenever Fedora packages the version you need. Fedora 45 carries every branch from 3.10 up to 3.14 next to the default, the legacy 3.9 and 3.6, and an alpha of the next release, so a managed download only earns its place for a point release Fedora has not shipped yet. Fedora 44 carries the same set, with 3.15 as an extra in place of 3.14, which is its default. The managed 3.13 above took 108 MB in ~/.local/share/uv/python, and it stays at that patch level until you upgrade it through uv yourself.

System Python wins the default pick

Installing a managed interpreter does not make uv use it. With python-preference = "system", every command that names no version resolves to /usr/bin/python3, even when other builds sit in your home directory. What happens when you want the managed build by default? You flip the preference for one command with an environment variable:

mkdir -p ~/pref && cd ~/pref
uv venv -q && .venv/bin/python --version
UV_PYTHON_PREFERENCE=managed uv venv -q --clear && .venv/bin/python --version

You get the system interpreter in the first venv and the managed 3.13 in the second. Most guides tell you to “just set it in your uv.toml”, so a user config is the more interesting test. Create the user file.

mkdir -p ~/.config/uv
vim ~/.config/uv/uv.toml

Add the one line that turns automatic downloads back on. Leave python-preference out on purpose, so you can see which value uv ends up using. Save the file when you’re done.

python-downloads = "automatic"

With that file in place, ask for an interpreter Fedora’s install doesn’t have yet in a new directory, then go back and rebuild the venv in ~/pref without naming a version:

mkdir -p ~/py311 && cd ~/py311 && uv venv --python 3.11
cd ~/pref && uv venv -q --clear && .venv/bin/python --version

The 3.11 request downloaded a managed build without complaint. The plain rebuild still picked the system interpreter, as the last two lines of this capture show:

uv venv picks system Python 3.15.2 on Fedora 45 until UV_PYTHON_PREFERENCE=managed selects the managed 3.13.17 build

People miss this part. uv merges config files key by key, as the uv configuration files documentation describes, so a user file only replaces the keys it sets. Your python-downloads line overrode Fedora’s, but python-preference = "system" still came from /etc/uv/uv.toml because you never set it. To get upstream behaviour you have three options, from narrowest to widest:

  1. UV_PYTHON_PREFERENCE=managed on one command
  2. both keys in ~/.config/uv/uv.toml for your account
  3. --no-config to ignore every config file

Delete the test file with rm ~/.config/uv/uv.toml before the next section, or its automatic downloads will hide the behaviour shown there. Pick the narrowest option that solves your problem. Editing /etc/uv/uv.toml itself is the one option to avoid, because it changes uv for every account on the machine. rpm marks it %config(noreplace), so an edit survives updates, but a later Fedora change to the file then lands beside it as uv.toml.rpmnew where nobody looks.

uv from PyPI reads the same file

A common reaction is to install the “real” uv from PyPI and leave the Fedora package alone. It does not help, because /etc/uv/uv.toml is the system config path every uv build reads on Linux (a file under /etc/xdg/uv/ would take priority, but Fedora ships none). The lab installed the newer upstream release with uv itself, and since ~/.local/bin comes first in Fedora’s default PATH, the new binary shadows /usr/bin/uv. The hash -r below matters only in a shell that already ran uv, where bash still remembers the old path.

uv tool install -q uv && hash -r && type -a uv
uv --version
mkdir -p ~/py310 && cd ~/py310
uv venv --python 3.10
uv --no-config venv --python 3.10

Upstream’s binary hit the same “manual” wall as the packaged one, which tells you the setting lives outside the package. Only --no-config, which skips every persistent config file, let it download 3.10.

uv 0.13.8 installed from PyPI into ~/.local/bin still refuses Python downloads on Fedora 45 until uv --no-config skips /etc/uv/uv.toml

So the source of the binary does not decide the behaviour; the config files do. Keep the dnf package unless you need a uv feature that has not reached Fedora yet, because two copies mean two update paths and a PATH order you have to remember. uv tool uninstall uv followed by hash -r is the clean way back: after it, the lab’s uv --version answered from /usr/bin again.

Venvs ship without pip or RPM modules

A uv venv is a plain virtual environment with nothing seeded into it. You install packages with uv pip, and python -m pip does not exist unless you ask for it.

mkdir -p ~/scraper && cd ~/scraper
uv venv
source .venv/bin/activate
uv pip install requests
python -c "import sys, requests; print(sys.prefix, requests.__version__)"

uv resolved, downloaded and installed five packages in about 140 ms, and the import ran from the venv prefix.

Resolved 5 packages in 65ms
Prepared 5 packages in 39ms
Installed 5 packages in 37ms
 + certifi==2026.10.23
 + charset-normalizer==3.5.2
 + idna==3.20
 + requests==2.34.2
 + urllib3==2.8.0
/home/kenneth/scraper/.venv 2.34.2

Three habits from a pip workflow break here, and each has a direct replacement:

  • python -m pip: “No module named pip” until you create the venv with uv venv --seed
  • uv pip install --system: “Permission denied (os error 13)” on /usr/local/lib
  • import rpm in a venv: missing unless the venv sees system site-packages

The permission error on --system is the right outcome for a normal user, so leave it alone and use a venv. The rpm case is the Fedora-specific one. The rpm and libdnf5 bindings exist only as RPMs in the system site-packages, so a default venv cannot see them. --system-site-packages fixes that, but only on the system interpreter, because the bindings are compiled against it:

uv venv --clear -q --system-site-packages
.venv/bin/python -c "import rpm, libdnf5; print(rpm.__version__)"

Next, all three cases run back to back so you can compare them: a plain venv, a system-site-packages venv on /usr/bin/python3, and the same flag on the managed 3.13.

A uv venv on Fedora 45 imports rpm and libdnf5 only with --system-site-packages on the system Python, not on a managed 3.13

Only the middle one imports rpm. If your script queries the package database through the Python bindings for the libraries dnf5 is built on (the tool itself is covered in the DNF5 cheatsheet), keep that script on the system interpreter. A managed build has its own site-packages directory, so no flag will ever make those modules visible to it.

uv init pins your system Python

Projects are where the system preference leaves a lasting mark, because whatever uv picks on day one gets written down. uv init records the interpreter it found in two places:

  • .python-version, which picks the venv interpreter
  • requires-python in pyproject.toml, which sets the floor

On Fedora 45 that interpreter is 3.15, and both files get it. Create a project and read them back:

cd ~ && uv init feeds && cd feeds
cat .python-version pyproject.toml

Your new project already refuses anything older than the system Python, even though nothing in it needs a 3.15 feature yet.

3.15
[project]
name = "feeds"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.15"
dependencies = []

[project.scripts]
feeds = "feeds:main"

[build-system]
requires = ["uv_build>=0.13.5,<0.14.0"]
build-backend = "uv_build"

Add a dependency and run it. The first uv add creates .venv on /usr/bin/python3.15 and writes uv.lock, so a project never needs a separate uv venv step.

uv add httpx
uv run python -c "import sys, httpx; print(sys.version.split()[0], httpx.__version__)"

You’ll see 3.15.2 0.28.1 printed. Now the trap. Plenty of projects target the previous Python on purpose: the Django on Fedora guide builds its production venv on 3.14 because that release sits inside Django’s supported matrix. Installing python3.14 with dnf and pinning it looks like the obvious move:

sudo dnf install -y python3.14
uv python pin 3.14 && uv sync

uv refuses, and a grep shows the floor sitting in both the project file and the lock file:

uv fedora requires python pin error=3.15 on Fedora 45″ class=”wp-image-189864″/>

Your pin isn’t the problem; the floor is. Lower requires-python first, then pin and sync. For new projects, uv init --python 3.14 writes 3.14 into both places from day one, which the lab confirmed with a second project.

sed -i 's/^requires-python = ">=3.15"/requires-python = ">=3.14"/' pyproject.toml
uv python pin 3.14 && uv sync

uv rebuilt the venv on the RPM interpreter and re-resolved the lock for the wider range.

Updated `.python-version` from `3.15` -> `3.14`
Using CPython 3.14.10 interpreter at: /usr/bin/python3.14
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Resolved 8 packages in 40ms
   Building feeds @ file:///home/kenneth/feeds
      Built feeds @ file:///home/kenneth/feeds
Prepared 2 packages in 15ms
Installed 8 packages in 16ms
 + anyio==4.16.0
 + certifi==2026.10.23
 + feeds==0.1.0 (from file:///home/kenneth/feeds)
 + h11==0.16.0
 + httpcore==1.0.9
 + httpx==0.28.1
 + idna==3.20
 + typing-extensions==4.16.0

Notice the eighth package. typing-extensions was not in the first install, and it appears now because anyio’s entry in uv.lock carries the marker python_full_version < '3.15'. That is the lock doing its job: one uv.lock covers every interpreter inside requires-python, so a teammate on Fedora 44’s default Python and you on Fedora 45 get the same resolution. uv run feeds printed “Hello from feeds!” from the new venv.

Command-line tools belong in uv tool install, not in a project and never in sudo pip. Each tool gets its own venv under ~/.local/share/uv/tools and a symlink in ~/.local/bin, so its dependencies cannot collide with anything else you run:

uv tool install ruff
ruff --version

Ruff arrived as a single 10.1 MiB download and ran from the symlink straight away. IDEs pick up project venvs the same way: in the PyCharm on Fedora setup, point the interpreter dialog at .venv/bin/python as an existing environment and it uses whatever uv locked.

setuptools 82 dropped pkg_resources

The setuptools changelog lists this line under v82.0.0, released 8 February 2026: “pkg_resources has been removed from Setuptools.” Fedora 45’s own package is already past that release, and a dnf install shows it:

sudo dnf install -y python3-setuptools
python3 -c "import setuptools; print(setuptools.__version__)"
python3 -c "import pkg_resources"

Fedora 45’s setuptools reports 83.0.0, and the second import fails because the module is gone from the package.

83.0.0
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Does that system package decide what uv builds with? No. When uv builds an sdist, it creates an isolated build environment and installs whatever the package’s build requirements allow from PyPI, which today means the newest setuptools. Any old setup.py that imports pkg_resources breaks there. wirerope 0.4.6 is a real example: it ships only an sdist, and its setup script does exactly that.

mkdir ~/legacy && cd ~/legacy
uv venv -q
uv pip install wirerope==0.4.6

setuptools’ build backend died inside the temporary build env under ~/.cache/uv/builds-v0. The uv hint after the traceback suggests adding pkg_resources as an extra build dependency, which points you the wrong way, because pkg_resources always shipped inside setuptools. Pinning the build backend is what works, and for the uv pip interface that means a build constraints file:

echo "setuptools<82" > build-constraints.txt
uv pip install --build-constraint build-constraints.txt wirerope==0.4.6

Both runs are in the next capture. You’ll see the failure with its ModuleNotFoundError first, then the constrained build, which pulls in six and installs cleanly.

wirerope 0.4.6 fails to build with No module named pkg_resources under uv, then builds with a setuptools below 82 build constraint

In a uv project, put the same constraint in pyproject.toml so everyone who syncs the project inherits it. To watch it work, drop the cached wheel from the previous run and start a throwaway project, where the add fails with the same pkg_resources error:

uv cache clean wirerope
cd ~ && uv init -q --app oldapp && cd oldapp
uv add wirerope==0.4.6

Open the file with vim pyproject.toml and append this table. If your project already has a [tool.uv] table, put the key under it instead, because a second table with the same name is a TOML error:

[tool.uv]
build-constraint-dependencies = ["setuptools<82"]

Run uv add wirerope==0.4.6 again and it builds wirerope, pulls in six and installs both. Skip the cache clean and the result lies to you. The first attempt in the lab passed without the constraint, because uv reused the wheel it had built minutes earlier in ~/legacy. CI runners and new laptops start with an empty cache, so the clean run is the one that predicts what they will see.

Match the fix to where pkg_resources is imported. A build pin does nothing for an import that runs in your application, and a runtime pin never reaches the isolated build env, so picking the wrong one leaves the error in place:

  • a dependency’s setup.py, one-off install: --build-constraint file
  • a dependency’s setup.py, uv project: build-constraint-dependencies
  • your own code at runtime: uv add "setuptools<82"

You’ll find the runtime pin in the Python, Node.js, Go and Rust setup on Fedora, so it is not repeated here. Treat all three as stopgaps, because the real fix is replacing pkg_resources calls with importlib.metadata and importlib.resources.

Fedora 44 fails the same build

Fedora 44 looks safe at first glance. Its python3-setuptools is still on the 80 line, import pkg_resources works with a deprecation warning, and its uv package sets the same three values in /etc/uv/uv.toml. Run the same wirerope install there in a fresh venv. If this machine already built wirerope once, run uv cache clean wirerope first, for the cache reason covered above.

sudo dnf install -y uv python3-setuptools
rpm -q uv python3-setuptools
python3 -c "import setuptools, pkg_resources; print(setuptools.__version__)"
mkdir -p ~/legacy44 && cd ~/legacy44 && uv venv -q
uv pip install wirerope==0.4.6

It fails exactly as it did on Fedora 45, because build isolation never looks at the system setuptools. Isolation exists to make builds reproducible, and here that’s precisely what works against you.

Fedora 44 ships setuptools 80.10.2 with pkg_resources, yet uv build isolation still fails on wirerope 0.4.6

Breakage follows PyPI, not your Fedora release, so the build constraint belongs in the project on both. The two lab VMs compared like this:

CheckFedora 45Fedora 44
System python33.15.23.14.10
uv package0.13.5-3.fc450.13.5-2.fc44
/etc/uv/uv.tomlmanual, system, system-certsidentical three settings
Extra RPM interpreters3.6, 3.9, 3.10 to 3.14, 3.16 alpha3.6, 3.9, 3.10 to 3.13, 3.15, 3.16 alpha
python3-setuptools83.0.0, no pkg_resources80.10.2, pkg_resources with warning
wirerope 0.4.6 sdist buildfailsfails

Only two rows differ in a way you would notice day to day: the default interpreter and the system setuptools. Neither changes what a uv build does, which is why a project that works on one release works on the other once the constraint is in.

Which uv setting wins on Fedora

When uv does something you did not expect, walk this table from the top. For single values, the first layer that sets a key decides it and the layers below only fill in keys left unset; array settings found in several files are concatenated instead, project entries first.

OrderLayerExampleWhat the lab showed
1Command-line flag--no-config, --python 3.10--no-config skipped /etc/uv/uv.toml and downloaded 3.10
2Environment variableUV_PYTHON_PREFERENCE=managedPicked managed 3.13.17 over system 3.15.2
3Project config[tool.uv] in pyproject.toml, plus .python-version as the interpreter requestBuild constraint fixed wirerope; pin moved the venv to 3.14
4User config~/.config/uv/uv.tomlTurned downloads on, left preference at system
5System config/etc/uv/uv.toml from the RPMRead by both the dnf uv and the PyPI uv
6uv built-in defaultautomatic downloads, managed preferenceNever reached on Fedora unless you pass --no-config

Row 5 is the Fedora-specific one, and row 6 is what the upstream docs and most tutorials assume. If you keep Fedora’s defaults, you only need three habits: a dnf install per interpreter, --python on every uv init, and a setuptools<82 build constraint in any project that still depends on old sdists.

Keep reading

How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Fedora How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Things to Do After Installing Fedora 45 Workstation Fedora Things to Do After Installing Fedora 45 Workstation Enable RPM Fusion and Multimedia Codecs on Fedora 45 / 44 / 43 Fedora Enable RPM Fusion and Multimedia Codecs on Fedora 45 / 44 / 43 DNF Cheat Sheet: dnf5 on Fedora, dnf on Rocky Linux 10 (PDF) Cheat Sheets DNF Cheat Sheet: dnf5 on Fedora, dnf on Rocky Linux 10 (PDF) Install Nextcloud Office Desktop on Ubuntu and Fedora Desktop Install Nextcloud Office Desktop on Ubuntu and Fedora Install IntelliJ IDEA on Arch | Manjaro | EndeavourOS Programming Install IntelliJ IDEA on Arch | Manjaro | EndeavourOS

Leave a Comment

Press ESC to close