pipenv couldn't display progress bar when it downloads package

Created on 2 Jul 2018  Â·  7Comments  Â·  Source: pypa/pipenv

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
Discussion

Most helpful comment

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

All 7 comments

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.

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.

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 ?

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

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

any progress for this feature?

any progress on this?

Was this page helpful?
0 / 5 - 0 ratings