Skip to content

Allow to override pip version for pipenv users #1093

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

Closed
vityas opened this issue Oct 8, 2020 · 7 comments
Closed

Allow to override pip version for pipenv users #1093

vityas opened this issue Oct 8, 2020 · 7 comments

Comments

@vityas
Copy link

vityas commented Oct 8, 2020

question

Assuming that we don't want to build a new buildpack, is there a workaround for pipenv users to be able to install packages that require a newer pip? unpin and override pip.

reason

A common example of a package that will fail to install is tensorflow>=2.0

side question

I doubt any developers keep using pip==9.0.2. It seems like the main and only reason to pin 9.0.2 is that (#786)

it "would require users to uninstall and reinstall their local pipenv environments"

Not sure how some one-time inconvenience can outweigh the need to have the same environment. which simply not possible with the old pip.

example PR

see the attached PR. I created it as an example. It might not be the best solution, I would love to see some workarounds.

vityas added a commit to vityas/heroku-buildpack-python that referenced this issue Oct 8, 2020
Allow for a manual override of pip version for pipenv users (PR)
heroku#1093
@edmorley
Copy link
Member

Hi! I've left a comment on the PR:
#1094 (review)

@timmygee
Copy link

Just flagging that the legend @alan-eu has created a fork that does exactly this

https://github.com/alan-eu/heroku-buildpack-python

@edmorley
Copy link
Member

edmorley commented Feb 12, 2021

Hi! The pipenv (and pip) version has just been updated in #1169.

I'm closing this out since adding env var support for pipenv/pip is something that I believe will introduce more issues than it fixes for the reasons mentioned in:
#1094 (comment)

However thank you for suggesting this change, and please do open issues for any other ideas you may have :-)

@timmygee
Copy link

timmygee commented Feb 12, 2021

To your decision to not support this, I respectfully object. Complex Django applications such as my own, rely on dependency resolution as provided by Pipfile.lock. It also requires the python cryptography module, which itself requires a recent version of pip to actually build and install. Pip version 9 does not cut it. The fact that this buildpack only provides pip version 9 for projects built out with pipenv, when the latest version of pip is version 20+, is not great.

I'd switch to poetry, which seems to be preferred over pipenv these days but that's not supported by this buildpack at all.

I can now literally only get my project deployed using @alan-eu's forked version of this buildpack.

I know I'm not the only one who has this problem. Anyone who uses pipenv and packages that require a modern version of pip will also have this issue. Please support the python community when it comes to this.

What would also solve the issue is if pip (and ideally also pipenv) was upgraded to the latest version before pipenv starts running.

@tolomea
Copy link

tolomea commented Feb 12, 2021

@timmygee The pull @edmorley linked updates both Pip and Pipenv to current versions.

@timmygee
Copy link

Right! Thanks @tolomea. That wasn't clear.

That also solves my problem just fine. Thank you @edmorley for doing this!

@edmorley
Copy link
Member

No problem! I'm going to try and keep pipenv more up to date moving forwards (and hope to never have to pin it to an older pip again!).

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

4 participants