Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pip hangs in Windows 7

I have Python 2.7.10 installed with pip om Windows 7. When I'm trying to install package or even just run pip in cmd with no options, it stacks, prints nothing, and even ctrl+c does not work, I have to close cmd.
Task Manager shows 3 running pip.exe *32 processes, and when I close cmd I can kill one of them. Other 2 are removed only after reloading Windows.
Same thing happens with Python 3.5 I tried to reinstall pip or python, neither was helpful.
pip-7.1.2

upd 1
Figured out that I have same problem with virtualenv.

like image 715
user3684055 Avatar asked Nov 15 '15 19:11

user3684055


2 Answers

I had exactly the same problem. The reason - in my case - was my antivirus program Avast. It blocked pip. As soon as I inactivated it. It works. I need to find a way now to explain Avast to stop blocking pip.

like image 105
3bek Avatar answered Sep 22 '22 12:09

3bek


I had the same problem (pip and virtualenv hanged). As 3bek suggested here, it was indeed Avast!'s fault. To verify this you can disable Avast for a few minute and try pip again.

In order to teach Avast to respect these programs here's what did:

  1. Open Avast GUI, go to settings->general->exclusions
  2. Add the global pip.exe to the file paths. For me it was c:\Python34\Scripts\pip.exe.
  3. Now run this global pip in the command line (that is, not under any virtualenv). This should be ok (at list for me it was after Avast checked the exe).
  4. After this I could run all other pip.exe which are part of my different virtualenvs.
like image 34
sivanr Avatar answered Sep 21 '22 12:09

sivanr