jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.69k stars 610 forks source link

pip-sync doesn't uninstall manually installed xgboost pip package. #2127

Open kyuwoo-choi opened 2 days ago

kyuwoo-choi commented 2 days ago

Environment Versions

  1. OS Type: linux
  2. Python version: 3.10.14
  3. pip version: 24.2
  4. pip-tools version: 7.4.1

Steps to replicate

  1. pip install xgboost
  2. pip list | grep xgboost see xgboost 2.1.1 listed
  3. pip-sync blank-requirements.txt tells "Everything up-to-date"

Expected result

removes the xgboost and nvidia-nccl-cu12 which is dep for xgboost. ...

Actual result

image

manually installed pip package and it's dependency leave ...

AndydeCleyre commented 2 days ago

I think your issue is that the pip-tools you're using is not installed in the same environment you're trying to modify, but it needs to be to work properly. Notice that in your pip list output pip-tools is absent. So the environment changed by the sync is a different one.