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.
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.
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.
Try to use easy-install insted of pip it works in the same way.
#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.
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
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
Download the appropriate precompiled wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/
Type pip install /path/to/module.whl
This worked perfectly for me. Hope this helps anyone else with this exact issue.
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....
I had the same problem. Just disable your antivirus and it should work.
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.
If you have a certain network it can block pip for installation. For my case I used my own network without VPN.
Related
I have a problem just like the one in this thread:
pip install BeautifulSoup nothing happens
I saw the solution to the post and figured that I didn't need to worry about whether or not I installed pip correctly since later versions of Python come with pip (I installed python only a few weeks ago). I also tried downloading get-pip.py and running it in the CMD like the solution said and it says the python is not recognized as an internal or external command etc. I'm assuming it's because there might be something wrong with my environment path variable?
Currently it is: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Python27\scripts
Is there something wrong?
Try to turn off your firewall. (At least it helped in my case when I faced similar problem).
and thanks to anyone who gives some of their time to consider my problem.
What I need help on is for someone to give me a simple and accessible explanation on how to install that module. I have never, ever used anything from PyPi before, I have only heard of pip after looking up PyCallGraph.
I'm not a programmer first, I'm doing an accounting internship and am using python to write scripts to help me speed up some processes, at the urging of a colleague who himself uses python. I write scripts using Notepad++ and execute them through IDLE.
I'm currently working on optimizing a script I wrote and came upon PyCallGraph while checking this very site on tips on how to do so.
I tried the very minimalistic instruction of just doing "pip install pycallgraph" just about anywhere I could think of, including cmd.exe, to no avail. Runing get-pip.py directly seems to have worked for installing pip, though.
Otherwise I can always just stick with the cProfile printout and write-off using modules needing such an install, although that saddly seems to be quite a few...
Step 1: Install PIP
Open terminal (cmd.exe, PowerShell, whatever)
Download get-pip.py and place it in the working directory of your terminal
Install PIP by invoking python get-pip.py
Confirm that PIP was installed correctly by invoking command pip (should display help if success)
If pip didn't work, make sure your PATH environment variable has been set up correctly. In typical Windows installations pip is installed under c:\Python27\Scripts. Make sure this folder is included in PATH.
Step 2: Install your library with PIP
Invoke pip install pycallgraph
PIP installs the library and it can be now used from Python
Using python PIP (pypi) in Windows 7, how can I keep the pop up window open to see the results of the install (especially if there was an issue)? Or Is there a log that I can review?
Ex:
pip install selenium2Library
I figured an easy work around.. use this:
\Python27\python.exe \Python27\Scripts\pip-2.7-script.py install eyed3
This runs in the current cmd window, instead of a new one that auto closes when done.
This isn't the best solution, because I'm still looking for a proper answer, but what is currently working for me is instead of running pip from the command prompt I'm using cygwin instead. Exactly the same commands to use it: pip install module except that cygwin seems to catch the output of the program.
Find cygwin here: http://cygwin.com/install.html
This is happening for some of my coworkers, but not me.
We had downloaded a pip binary. We fixed it by uninstalling pip, running ez_setup, then running easy_install pip.
Trying to install various packages on a Windows 7 64 bit and learned that ActivePython helps (as it includes easy_install among others).
It surely seems pretty robust. However I'm trying to easy_install a few packages and its failing.
The problem is that the easy_install.exe actually launches in a new terminal and closes on its own, even when there is a problem, how do I avoid that ?
Anyone faced this issue ?
Perhaps easy_install is trying to relaunch itself as Administrator in a different window which quits immediately after easy_install exits. Try running easy_install from an Administrator prompt.
As a recommendation for ActivePython users, easy_install should only be used a last resort; you should first try installing packages using PyPM (included in ActivePython). See http://code.activestate.com/pypm/
try specifying the command like so:
c:\python27\python.exe -m easy_install Django==1.6.5v
Trying to install various packages on a Windows 7 64 bit and learned that ActivePython helps (as it includes easy_install among others).
It surely seems pretty robust. However I'm trying to easy_install a few packages and its failing.
The problem is that the easy_install.exe actually launches in a new terminal and closes on its own, even when there is a problem, how do I avoid that ?
Anyone faced this issue ?
Perhaps easy_install is trying to relaunch itself as Administrator in a different window which quits immediately after easy_install exits. Try running easy_install from an Administrator prompt.
As a recommendation for ActivePython users, easy_install should only be used a last resort; you should first try installing packages using PyPM (included in ActivePython). See http://code.activestate.com/pypm/
try specifying the command like so:
c:\python27\python.exe -m easy_install Django==1.6.5v