pip install vprof fails

2019-08-27 22:38发布

问题:

I'm trying to install the package vprof from PyCharm but I'm getting the error:

Collecting vprof

Using cached https://files.pythonhosted.org/packages/0b/2b/5b690c8bd73231216c82180b7b162cf433dd98d6212b19a7374c5cf09622/vprof-0.36.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\xxx\AppData\Local\Temp\pycharm-packaging\vprof\setup.py", line 12, in from pip.download import PipSession ImportError: No module named download


Command "python setup.py egg_info" failed with error code 1 in C:\Users\xxx\AppData\Local\Temp\pycharm-packaging\vprof\

Can someone tell me what I'm doing wrong? Other packages like Theano, NLTK or astor are getting installed without a problem. I'm using pip version 10.0.1 and python 2.7 and PyCharm 2018.1.2.

Searching for the error "No module named download" didn't get me any solutions.

回答1:

vprof imports pip which is very much discouraged. And it uses the old API from pip before version 10. You have to downgrade pip back to version 9:

pip install -U 'pip>=9,<10'

Also I recommend to report the bug at the vprof issue tracker.



回答2:

python -m pip install -U 'pip>=9,<10'
pip install vprof

did the job for me