Skip to content
New issue

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

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

Already on GitHub? # to your account

installing package with ~= leads to installing the latest version of that package #5594

Closed
EiJayK opened this issue Feb 6, 2023 · 2 comments · Fixed by #5650
Closed

installing package with ~= leads to installing the latest version of that package #5594

EiJayK opened this issue Feb 6, 2023 · 2 comments · Fixed by #5650
Labels
Type: Documentation 📖 This issue relates to documentation of pipenv.

Comments

@EiJayK
Copy link

EiJayK commented Feb 6, 2023

Issue description

pipenv install "tensorflow~=2.9" leads to the installation of the latest version of tensorflow which is 2.11.x I would expect that it would not update the major version

Expected result

a version of tensorflow equal to 2.9.3 (for example)

Actual result

tensorflow 2.11.x

Steps to replicate

python 3.7
run on cli
pipenv install "tensorflow~=2.9"

@matteius
Copy link
Member

matteius commented Feb 6, 2023

I think this is expected, -- the tilde-equals operator takes the least most significant specified value, in this case .9 and makes it flexible. If you wanted to restrict further you could do pipenv install "tensorflow~=2.9.3" which would upgrade to anything in 2.9 (making the .3 flexible).

@EiJayK
Copy link
Author

EiJayK commented Feb 6, 2023

Ok, thanks I will try this

I would suggest to adjust the documentation a bit as it can be a little bit misleading

"""
For example, to install requests you can use:

$ pipenv install requests~=1.2
Pipenv will install version 1.2 and any minor update, but not 2.0.
"""

see: Specifying Versions of a Package

@matteius matteius added the Type: Documentation 📖 This issue relates to documentation of pipenv. label Feb 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Type: Documentation 📖 This issue relates to documentation of pipenv.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants