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

pip-sync does not upgrade existing packages #1021

Closed
tekumara opened this issue Dec 22, 2019 · 6 comments · Fixed by #1023
Closed

pip-sync does not upgrade existing packages #1021

tekumara opened this issue Dec 22, 2019 · 6 comments · Fixed by #1023
Labels
support User support

Comments

@tekumara
Copy link
Contributor

Environment Versions

  1. OS Type
  2. Python version: 3.6.9
  3. pip version: pip 19.3.1
  4. pip-tools version: pip-sync, version 4.3.0

Steps to replicate

# run the following in a new virtualenv

$ pip install boto3==1.10.44 pyjq==2.3.1 pytoml==0.1.20 argh==0.26.2

$ pip freeze
argh==0.26.2
boto3==1.10.44
botocore==1.13.44
docutils==0.15.2
jmespath==0.9.4
pyjq==2.3.1
python-dateutil==2.8.1
pytoml==0.1.20
s3transfer==0.2.1
six==1.13.0
urllib3==1.25.7

$ cat requirements.txt
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile
#
argh==0.26.2
boto3==1.10.43
botocore==1.13.44         # via boto3, s3transfer
docutils==0.15.2          # via botocore
jmespath==0.9.4           # via boto3, botocore
pyjq==2.4.0
python-dateutil==2.8.1    # via botocore
pytoml==0.1.21
s3transfer==0.2.1         # via boto3
six==1.13.0               # via python-dateutil
urllib3==1.25.7           # via botocore

$ pip-sync
Everything up-to-date

Expected result

That the following up/downgrades would occur:

boto3 1.10.44 -> 1.10.43
pyjq 2.3.1 > 2.4.0
pytoml 0.1.20 -> 0.1.21

Actual result

No up/downgrades occurred.

@atugushev
Copy link
Member

Hello @tekumara

Thanks for the issue. I can't reproduce it locally. Perhaps, you run the pip-sync installed in other virtual environments, where the packages are already upgraded. Could you check the python, pip and pip-sync paths by running the following commands?

  • which python
  • which pip
  • which pip-sync

Thanks!

@atugushev atugushev added awaiting response Awaiting response from a contributor support User support labels Dec 24, 2019
@tekumara
Copy link
Contributor Author

Ah.. So I installed pip-tools using pipx into its own virtualenv because I didn't want to pollute my project's requirements.txt with pip-tools.

This is what I have

$ which python
/Users/tekumara/.virtualenvs/my-project/bin/python

$ which pip
/Users/tekumara/.virtualenvs/my-project/bin/pip

$ which pip-sync
/Users/tekumara/.local/bin/pip-sync

Is it possible to make pip-sync work when installed in its own virtualenv?

@atugushev
Copy link
Member

I see. You don't have to put pip-tools to requirements.txt, but make sure that pip-tools installed in the virtual environment.

@atugushev
Copy link
Member

Is it possible to make pip-sync work when installed in its own virtualenv?

Unfortunately not. pip-tools must be installed in the virtual environment.

@tekumara
Copy link
Contributor Author

Gotcha. That wasn't intuitive to me. Would you accept a PR to mention this in README.md?

@atugushev
Copy link
Member

Great idea. PR is highly welcomed!

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

Successfully merging a pull request may close this issue.

2 participants