question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipenv take longer and instance hangs up

See original GitHub issue

I’m using Pipenv for package management and configured Pipeline from Bitbucket to AWS EC2 instance via CodeDeploy.

While running the script

pipenv install

It takes longer and instance hangs up at

Installing dependencies from Pipfile.lock (a34ea0)…

The instance has to be restarted manually by stop-start to get it back to normal.

This is a weird scenario and Pipenv is not performing well.

Even though there is nothing updated in the package, I had to run the pipenv install script.

  1. Is there any way to optimize this?
  2. Is there any way to check if the hash is outdated and only then run the pipenv install using bash script?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
anuj9196commented, Jul 16, 2019

I run the two commands. one with --deploy and another without it in local development PC with 8 GB RAM

user@pc:~/code/project/app$ time pipenv install
Installing dependencies from Pipfile.lock (1e8942)...
  🐍   β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰ 103/103 β€” 00:00:38
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

real    0m43.039s
user    1m39.556s
sys     0m9.872s

user@pc:~/code/project/pc$ time pipenv install --deploy
Installing dependencies from Pipfile.lock (1e8942)...
  🐍   β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰ 103/103 β€” 00:00:28

real    0m31.107s
user    1m40.320s
sys     0m9.540s

The time is almost the same for both commands. There is no effect of adding --deploy #2284

1reaction
anuj9196commented, Jul 15, 2019

I tried with --deploy flag but it still wait for installing the libraries even if they are not new. Is there any faster way to speed up the installation?

The pipenv install is freezing the server and only way is to restart the server. This is really painful. All memory is consumed by it on a low memory server.

I have AWS t2.micro instance with 1 GB RAM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Pipenv Errors and How to Solve Them: Why Won't it ...
As long as this typo remains in the Pipfile, installing a package, existent or not, causes the locking to fail. You'll need to...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
Run pipenv lock --clear and try again. The lock sequence caches results to speed up subsequent runs.
Read more >
What does pipenv do after installing that takes up so much ...
It takes the hash from the artifact URL if possible instead of always recomputing it, which seems to drastically improve locking time.
Read more >
Pipenv: Python Dev Workflow for Humans β€” pipenv 2022.12 ...
a short animation of pipenv at work. The problems that Pipenv seeks to solve are multi-faceted: You no longer need to use pip...
Read more >
Specifying dependencies using a requirements file
In your development environment, you can use the pip freeze command to generate ... The following example uses Pipenv to install Django and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found