Skip to content

pixi install/update skip reinstall when a pypi dep's source changes from registry to git (versions match) #6190

Closed

Description

@reeceomahoney

Problem

When a PyPI dependency in pixi.toml is changed from a version constraint (registry source) to a { git = "..." } source, pixi install and pixi update <name> no-op and the env keeps the previously installed registry wheel. The lock file is updated, but the on-disk env is not reconciled against it.

I suspect the installer sees name==version already satisfied and skips reinstall, without comparing the source kind against the installed direct_url.json.

Repro

pixi.toml:

[workspace]
name = "repro"
channels = ["conda-forge"]
platforms = ["linux-64"]

[dependencies]
python = ">=3.12,<3.13"

[pypi-dependencies]
lerobot-doctor = ">=0.1.0,<0.2"
pixi install
# lerobot-doctor 0.1.0 installed from PyPI (direct_url.json absent / empty)

Edit pixi.toml:

- lerobot-doctor = ">=0.1.0,<0.2"
+ lerobot-doctor = { git = "https://github.com/jashshah999/lerobot-doctor" }
pixi install                          # no reinstall
pixi update lerobot-doctor            # no reinstall

Inspect:

cat .pixi/envs/default/lib/python3.12/site-packages/lerobot_doctor-*.dist-info/direct_url.json
# (empty — still the registry wheel; expected to point at the git URL)

Expected

After changing the source, pixi install (or at minimum pixi update <name>) should evict the installed registry wheel and reinstall from git, updating direct_url.json to record the git URL + commit.

Workaround

Manually remove the package's site-packages dir and dist-info, then pixi install:

rm -rf .pixi/envs/default/lib/python3.12/site-packages/lerobot_doctor \
       .pixi/envs/default/lib/python3.12/site-packages/lerobot_doctor-*.dist-info
pixi install

Environment

  • pixi 0.68.0
  • Platform: linux-64
  • TLS backend: rustls

Related

Same class of "source spec changed but reinstall/cache didn't notice" bug as #4844 (global), #1695, #6111, #6122.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions