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

pipenv couldn't display progress bar when it downloads package #2487

Closed
lennonwoo opened this issue Jul 2, 2018 · 15 comments
Closed

pipenv couldn't display progress bar when it downloads package #2487

lennonwoo opened this issue Jul 2, 2018 · 15 comments
Labels
Type: Discussion This issue is open for discussion.

Comments

@lennonwoo
Copy link

lennonwoo commented Jul 2, 2018

I sometimes download big package such as pytorch.
When my network speed is slow, the progress of downloading will take long time to execute.
The output in the consolse just spin and don't give me more feedback like download speed
or complete rate.
I have try add --verbose but don't work as my exception.
I could use pip to isntall and use pipenv to lock, but this solution not sound good.
I am wondering if pipenv have feature like $ pip install torch --progress-bar=on
and something like this:

  Downloading https://files.pythonhosted.org/packages/69/43/380514bd9663f1bf708abeb359b8b48d3fabb1c8e95bb3427a980a064c57/torch-0.4.0-cp36-cp36m-manylinux1_x86_64.whl (484.0MB)
    0% |                                | 563kB 248kB/s eta 0:32:28
@uranusjr
Copy link
Member

uranusjr commented Jul 2, 2018

Hi! Thanks for the report. Unfortunately I feel I am not able to comprehend the situation well. Could you elaborate when you want the download progress to appear, and suggest how we could add this to our current output? It would help immensely if you could provide a fake output to illustrate how you imagine the end result would look like if we implement this.

@uranusjr uranusjr added the Type: Discussion This issue is open for discussion. label Jul 2, 2018
@lennonwoo
Copy link
Author

Thanks for your reply.
I mean, sometimes when we want to install a big pypi package like pytorch (the pytorch's .whl package size is 400+Mb), and one's internet speed is slow (say 400Kb/s). In this situation, we need to wait about 17 minutes to finish downloading. During this time, the user cannot add options to pipenv to display package downloading speed or complete rate. The normal pipenv output to console during download pypi package is as follow:

$ pipenv install torch -v
Installing torch…
⠋Installing 'torch'
⠙$ "/home/lennon/.local/share/virtualenvs/test-yq5-nVUR/bin/pip" install   --verbose    "torch" -i https://pypi.org/simple --exists-action w
⠸

What I want is something like wget and pip's progress-bar function.

say command $ wget https://pjreddie.com/media/files/yolov3.weights
the wget will output to console the speed, complete rate, remain time to complete as follow:

--2018-07-02 20:19:50--  https://pjreddie.com/media/files/yolov3.weights
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving pjreddie.com (pjreddie.com)... 128.208.3.39
Connecting to pjreddie.com (pjreddie.com)|128.208.3.39|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 248007048 (237M) [application/octet-stream]
Saving to: ‘yolov3.weights’

yolov3.weights            0%[                               ] 455.70K  24.8KB/s    eta 2h 25m

And we can found the pip's additional options in https://pip.pypa.io/en/stable/man/commands/install/?highlight=progress-bar#cmdoption-progress-bar
when we use pip to download package, it will provide enough infomation for user about package downloading information.
the pip's output is something like wget:

$ pip install torch --progress-bar=on
Collecting torch
  Downloading https://files.pythonhosted.org/packages/69/43/380514bd9663f1bf708abeb359b8b48d3fabb1c8e95bb3427a980a064c57/torch-0.4.0-cp36-cp36m-manylinux1_x86_64.whl (484.0MB)
    0% |                                | 143kB 20kB/s eta 6:36:45

So, my suggestion is that maybe pipenv could provide a option mentioned previously. The user will know how long he could leave alone pipenv's installation and handle other things.

@lennonwoo
Copy link
Author

I realize that the pipenv finally call pip_install and delegate installation command to subprogress in https://github.com/pypa/pipenv/blob/master/pipenv/vendor/delegator.py#L152
Could we get more detail information output from subprocess and display it in parent progress's console, for example https://stackoverflow.com/questions/18421757/live-output-from-subprocess-command ?

@Alexander3
Copy link

Alexander3 commented Jan 21, 2019

It would be nice to have some kind of indication what pipenv is doing. Now I get output like this:

$ pipenv install --system --dev --deploy
Installing dependencies from Pipfile.lock (5bec78)…
Ignoring idna-ssl: markers 'python_version < "3.7"' don't match your environment

[nothing at all for minutes, I have no idea if my ssh connection is broken, or pipenv hanged, or what... ]

showing download progress/ speed would be perfect, but I wold be also happy if i could see spinner like in npm or anything that would indicate that something is happening.
I'm using version 2018.11.26

@techalchemy
Copy link
Member

Pull requests are welcome, I agree that would be a great feature

@netokey
Copy link

netokey commented Nov 8, 2019

any progress for this feature?

@elpapi42
Copy link

any progress on this?

3 similar comments
@suupic
Copy link

suupic commented Jan 16, 2021

any progress on this?

@lgblkb
Copy link

lgblkb commented May 17, 2021

any progress on this?

@AnimeAllstar
Copy link

any progress on this?

@Arcitec
Copy link

Arcitec commented Feb 19, 2022

no progress on this. but I do this to check my downloads: du -h ~/.cache/pipenv. It slowly grows when files have finished downloading, so at least you see that something is happening.

@matteius
Copy link
Member

What version of pipenv and what version of bash? This isn't an issue for me on linux, OS X or windows -- I see the progress bar rendering.

@Arcitec
Copy link

Arcitec commented Feb 19, 2022

@matteius 2022.1.8 on zsh on Linux. And yeah I see the spinner with the text "Locking ...", but no download indicator that says X/Y MB or time estimates.

After the download into the pipenv cache is complete, I see an unzip progress indicator, but that info is useless.

@matteius
Copy link
Member

@Bananaman Are you able to run bash in your shell? Try entering bash and also report your bash --version to see if the graphical progress bar is visible? The Locking portion doesn't have a progress bar because it is non-deterministic (?) to figure out all the dependencies, so it cannot estimate to you how long that would take. But also locking is not downloading packages, it is fetching metadata about them from pypi. You should see a progress bar when things are installing:

image

@matteius
Copy link
Member

Progress bar has been removed in an optimization to batch install which cut the average install time in half.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Discussion This issue is open for discussion.
Projects
None yet
Development

No branches or pull requests