Reputation: 1136
I'm using pipenv in a new project I'm working on. Initial pipenv install
was Django, with Pipfile showing:
[packages]
django = "*"
and Pipfile.lock showing:
"version": "==1.11.7"
pipenv graph
and pip list
(from within the pipenv virtualenv) both show that Django version 1.11.7 is installed
However, when I do a subsequent pipenv install new-package
the Pipfile.lock is updated to show:
"version": "==2.0"
for Django, even though pipenv graph
and pip list
both show that version 1.11.7 is still installed locally. This obviously causes problems, as the local Django version is different to that which will be installed in a fresh environment, based on the Pipfile.lock.
It seems like pipenv install new_package
is updating the specified version of packages which have already been installed, without updating those packages to the latest version - which seems to be counterintuitive to me. As far as I can see the only way to keep the Pipfile.lock in sync with the local environment would be to either pin all package versions in the Pipfile, or to follow up every pipenv install ...
with a pipenv update
- neither of which seems to be a particularly intuitive workflow.
I haven't been able to find any documentation or useful answers online which really clarify this behaviour. Is this the expected behaviour, or am I missing something? What is the 'recommended' workflow for handling this situation using pipenv?
Upvotes: 1
Views: 2407
Reputation: 1136
This seems to be a similar/same issue to that described in these pipenv issues. My reading of the responses in the older, issue is that this behaviour is as expected, and that:
pipenv update
will be requiredpipenv install new-package
it's necessary to pin version in the PipfileIt would appear from current responses to this issue that there are no immediate plans to change this behaviour.
Upvotes: 1