Skip to content

error: Failed to generate package metadata for locally installed package (Failed to deserialize cache entry) #12318

@pnovotnak

Description

@pnovotnak

Summary

I have a service written in python (not an installable package). I just began using uv run within this project as a wrapper for project venv binaries and project-provided scripts. I am seeing this error after introducing uv run. I'm not 100% sure what conditions triggered it, but uv clean fixed the issue.

Image

I have the following in my pyproject.toml:

[tool.uv.sources]
my-package = { path = "generated" }

And the following in my uv.lock:

[[package]]
name = "my-package"
version = "0.0.0"
source = { directory = "generated" }

Finally, in generated/setup.py:

from setuptools import find_packages
from setuptools import setup


setup(
    name="my_package",
    packages=find_packages(),
    package_data={"": ["py.typed", "*.pyi"]},
    include_package_data=True,
)

I'm wondering a few things:

  1. Are there changes I can make to my configuration to prevent this? If not:
    1. Can this cache entry be automatically ignored in this case?
    2. Could the cache entry be automatically purged?

Apologies for not being able to provide all conditions to reproduce.


Notes:

  1. It's possible the uv version that created the entry is older than 0.6.8.

Platform

macOS 15.3.2 (24D81)

Version

0.6.8 (installed via brew), 0.6.8 (installed in venv)

Python version

venv: 3.10.16

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions