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

'save-exact' option for saving exact version in Pipfile #3441

Closed
SteveByerly opened this issue Jan 13, 2019 · 5 comments
Closed

'save-exact' option for saving exact version in Pipfile #3441

SteveByerly opened this issue Jan 13, 2019 · 5 comments
Labels
Status: Requires PEEP This issue requires an accompanying enhancement proposal

Comments

@SteveByerly
Copy link

SteveByerly commented Jan 13, 2019

I've looked through the docs and the cli, but cannot seem to find a way to save the version of the installed package explicitly without editing the Pipfile after installing a package.

Example:
pipenv install scipy would add scipy = "*" to the Pipfile.

I would have expected a way to have scipy = "==1.2.0" to the Pipfile instead.

I was wondering if this sort of functionality already exists and/or if there is any reason not to go this route.

This would be similar to running npm install react --save-exact, where the installed version is added to the package.json file.

Apologies in advance if this is not the right forum/format for this question. I had tried looking through the docs, Stackoverflow, and search engines without luck.

@jxltom
Copy link
Contributor

jxltom commented Jan 14, 2019

I'm +1 on this but it requires a PEEP https://github.com/pypa/pipenv/blob/master/peeps/PEEP-000.md since it is a API change.

For now, you can only edit the Pipfile manually and lock it again by pipenv lock or pipenv install --dev if you would like to lock/install.

@jxltom jxltom added the Status: Requires PEEP This issue requires an accompanying enhancement proposal label Jan 14, 2019
@xoelop xoelop mentioned this issue Dec 19, 2019
1 task
@xoelop
Copy link

xoelop commented Dec 30, 2019

BTW, I've just seen that you can do pipenv install --ignore-pipfile (source) and you install the versions that are saved in Pipfile.lock, ignoring Pipfile.

So there's no option so save-exact to Pipfile because it's being done already to Pipfile.lock every time you do pipenv install.

Just my 2 cents :)

@Demetri0
Copy link

Demetri0 commented Jan 16, 2021

I think that it should be by default behavior. I'm totally don't mean any version when I install something, but I mean the latest on the current moment(moment when I use pipenv install smth). And I wish bugfixes to be applicable so it should be not == but ~=

@unique1o1
Copy link

unique1o1 commented Mar 24, 2022

What I do to get the exact version is:

pipenv run pip freeze > requirements.txt
pipenv install -r requirements.txt     

Just a simple workaround so, that I don't have to dig the lock file. Though it can pollute your Pipfile with all the dependencies

@matteius
Copy link
Member

pipenv sync installs the versions from the lock file, and pipenv install re-lock with the Pipfile specifiers and then installs that updated lock file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Requires PEEP This issue requires an accompanying enhancement proposal
Projects
None yet
Development

No branches or pull requests

6 participants