Pip not working on windows 10, freezes command prompt

Question:

I recently installed Python for Windows 10 and need to use pip command to install the requests package.
However, whenever I try to use pip in cmd it just freezes my command prompt.

Using CTRL + C, CTRL + D or any command like that to cancel it does not work either, the prompt just freezes like its waiting for input or something, but I get no output or any clue about what to do.

Picture of command promt when its frozen

I have set the PATH variable correctly, and my computer finds pip and launches it, but it just freezes. I have also tried reinstalling Python countless times and manually reinstalling pip but nothing seems to do the trick.

Asked By: Olof H

||

Answers:

Try to use easy-install insted of pip it works in the same way.

Answered By: Marco Del Toro

@eryksun provided what I think should be the answer to this question. I also have had the command prompt hang whenever I try to use pip, but I do not want to use easy_install. The solution (from @eryksun) was to use python -m pip install package_name. This works great for managing python packages in windows 10.

Answered By: jthomas

Marco’s answer worked perfectly but the actual solution to the problem is that you should write your pip commands using python -m pip instead of just pip
so your command will be python -m pip install requests

Answered By: omarwaleed

Well, when you run python -m pip, it actually starts pip.exe as a child process, so in the end it freezes the same for me, although it runs a bit longer…
Worse is that the pip.exe process is completely zombie, no way to kill it even with ProcExpl….

Answered By: Greg Ware

I had exactly the same problem here (Windows 10.0.10240). After typing just “pip” and hitting enter, nothing else happened on the console. This problem was affecting including other .exe compiled python related scripts like mezzanine-project.exe.

The antivirus AVAST was the culprit (in my case) !!!

After disabling AVAST files module (or uninstalling AVAST) pip started working again.

Answered By: Márcio Moreira

I had the same problem. Just disable your antivirus and it should work.

Answered By: Sayf Boujan

i didn’t think i had the same issue as @Marcio, but the longer it went on, it turned out i did.

In avast, goto the settings, goto Active PRotection, go to File System Shield and add an exclusion for

C:Python27Scripts

should work without a reboot, did for me, I was having issues with the Virtualenv.exe which is in that folder.

Answered By: bytejunkie

I had this exact problem with the numpy module. The only way I could fix it is by following the steps found here: Installing NumPy and SciPy on 64-bit Windows (with Pip)

The steps were to

  1. Download the appropriate precompiled wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/
  2. Type pip install /path/to/module.whl

This worked perfectly for me. Hope this helps anyone else with this exact issue.

Answered By: Blairg23

If you have a certain network it can block pip for installation. For my case I used my own network without VPN.

Answered By: HesamJafarian

Thanks to @Marco Del Toro’s answer, using easy_install worked for me: I could install the packages I needed for my project. I also managed to fix pip using easy_install so pip also works for me now. The solution to fixing pip was: easy_install pip.


This answer was posted as an edit to the question Pip not working on windows 10, freezes command promt by the OP Olof H under CC BY-SA 3.0.

Answered By: vvvvv
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.