Reputation: 77
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.
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.
Upvotes: 6
Views: 7461
Reputation: 31640
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.
Upvotes: 0
Reputation: 112
Try to use easy-install
insted of pip
it works in the same way.
Upvotes: 1
Reputation: 1
If you have a certain network it can block pip for installation. For my case I used my own network without VPN.
Upvotes: -1
Reputation: 12065
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
pip install /path/to/module.whl
This worked perfectly for me. Hope this helps anyone else with this exact issue.
Upvotes: 1
Reputation: 1033
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:\Python27\Scripts
should work without a reboot, did for me, I was having issues with the Virtualenv.exe which is in that folder.
Upvotes: 4
Reputation: 9
I had the same problem. Just disable your antivirus and it should work.
Upvotes: 0
Reputation: 505
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.
Upvotes: 15
Reputation: 1
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....
Upvotes: 0
Reputation: 681
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
Upvotes: 1
Reputation: 2583
@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.
Upvotes: 1