Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipx installed pip-sync doesn't work with conda active env #2127

Open
kyuwoo-choi opened this issue Sep 19, 2024 · 3 comments
Open

pipx installed pip-sync doesn't work with conda active env #2127

kyuwoo-choi opened this issue Sep 19, 2024 · 3 comments

Comments

@kyuwoo-choi
Copy link

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
Copy link
Contributor

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.

@kyuwoo-choi
Copy link
Author

As you mentioned, it was an issue with the wrong environment.
I installed pip-tools globally with pipx, but running pip-sync didn't work in my active conda environment.
After running pip-sync with the --python-executable set to the conda environment's Python, it worked fine.

I did a quick search on the issues and thought pip-sync would work with the active Python environment, but it didn't.
Is this the expected behavior? I would like pip-sync to work with the active conda environment.

Thanks.

@kyuwoo-choi kyuwoo-choi changed the title pip-sync doesn't uninstall manually installed xgboost pip package. pipx installed pip-sync doesn't work with conda active env Sep 23, 2024
@kyuwoo-choi
Copy link
Author

kyuwoo-choi commented Sep 23, 2024

I changed title to reflect the issue right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants