Is Python's pipenv slow?
Question:
I tried switching from venv
& conda
to pipenv
to manage my virtual environments, but one thing I noticed about pipenv
that it’s oddly slow when it’s doing “Locking” and it gets to the point where it stops executing for “Running out of time”. Is it usually this slow or is it just me? Also, could you give me some advice regarding how to make it faster?
Answers:
Yes, I’ve found pipenv’s locking and dependency resolution is terrible. For what it’s worth, I’ve moved to just venv
and poetry. The poetry github has a section talking about pipenv, and also note that poetry is a little less concerned with your actual virtual environment, and more about dependency management/packaging.
Long-time ago, it was slow for reason. But now, it is slow for no reason:
https://github.com/pypa/pipenv/issues/3827
Please see this issue, there are a lot of similar issues about that ridiculous locking performance. But as you see, they call it “Enhancement”. Well, forgive me, WTF, it is literally a bug.
Pipenv is literally a joke. I spent 30 minutes staring at “Locking”, which eventually fails after exactly 15 minutes, and I tried two times.
The most meaningless thirty minutes in my life.
Was my Pipfile complex? No. I included “flask” with “flake8” + “pylint” + “mypy” + “black”.
Every time someone tries to fix the “dependency management” of Python, it just gets worse.
I’m expecting Poetry to solve this, but who knows.
Maybe it’s time to move on to typed languages for web development.
try using --skip-lock
like this :
pipenv install --skip-lock
Note : do not skip-lock when going in production
I have observed faster turn-around times with the following flow.
pipenv --rm && rm -rf Pipfile.lock && pipenv install --dev .
I tried switching from venv
& conda
to pipenv
to manage my virtual environments, but one thing I noticed about pipenv
that it’s oddly slow when it’s doing “Locking” and it gets to the point where it stops executing for “Running out of time”. Is it usually this slow or is it just me? Also, could you give me some advice regarding how to make it faster?
Yes, I’ve found pipenv’s locking and dependency resolution is terrible. For what it’s worth, I’ve moved to just venv
and poetry. The poetry github has a section talking about pipenv, and also note that poetry is a little less concerned with your actual virtual environment, and more about dependency management/packaging.
Long-time ago, it was slow for reason. But now, it is slow for no reason:
https://github.com/pypa/pipenv/issues/3827
Please see this issue, there are a lot of similar issues about that ridiculous locking performance. But as you see, they call it “Enhancement”. Well, forgive me, WTF, it is literally a bug.
Pipenv is literally a joke. I spent 30 minutes staring at “Locking”, which eventually fails after exactly 15 minutes, and I tried two times.
The most meaningless thirty minutes in my life.
Was my Pipfile complex? No. I included “flask” with “flake8” + “pylint” + “mypy” + “black”.
Every time someone tries to fix the “dependency management” of Python, it just gets worse.
I’m expecting Poetry to solve this, but who knows.
Maybe it’s time to move on to typed languages for web development.
try using --skip-lock
like this :
pipenv install --skip-lock
Note : do not skip-lock when going in production
I have observed faster turn-around times with the following flow.
pipenv --rm && rm -rf Pipfile.lock && pipenv install --dev .