Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip command does nothing

Tags:

python

pip

I just installed Python 2.7.10 on windows 10.
I have added my python and pip directory to my PATH like so:

enter image description here

My Scripts folder looks like this:

enter image description here

My problem is, when I type in "pip" in command prompt and press enter absolutely nothing happens, even if I wait several minutes. If I remove the Scripts directory from the PATH variable I just get the error message like "pip not recognized as internal or external command". Python works fine. I have also tried to reinstall both pip and Python but the same problem occurs. So, does anyone have any idea about why pip does not do anything?

**Edit: ** when I say it does not do anything, I mean the cmd "hangs", like if it is waiting for something to happen. The cursor just keeps on blinking.

like image 965
PandaDeTapas Avatar asked Nov 25 '15 14:11

PandaDeTapas


People also ask

Why is my pip command not working?

Reinstall Python to Fix 'Pip' is Not Recognized as an Internal or External Command. This error usually means there's a problem with the Python installation or the system variable PATH is not set up correctly. Try reinstalling Python and all its components to fix the problem.

Why is pip not working Linux?

'pip' is not recognized as an internal or external command, operable program or batch file. Linux – If you have installed Python on a Linux environment, the pip does not come with Python, and you need to install pip package manager as a separate package.

How do I run a pip command?

Ensure you can run pip from the command line Run python get-pip.py . 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they're not installed already. Be cautious if you're using a Python install that's managed by your operating system or another package manager.


2 Answers

One command that is bound to work is writing:

python -m pip install requests

This works because you hand off the script invocation to python, which you know works, instead of relying on the PATH environment variable of windows, which can be dodgy.

Packages like numpy that require c-extensions to be built, will not work with pip unless you have a C Compiler installed on your system. More information can be found in this question.

If you are, as you're saying, unfamiliar with the python environment, then let me assure you, you will have a better day by installing Anaconda.

Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes more than 300 of the most popular Python packages for science, math, engineering, and data analysis.

Anaconda comes with numpy, of course.

like image 67
Sebastian Wozny Avatar answered Oct 11 '22 06:10

Sebastian Wozny


After Python including pip at package, pip commands not work sometimes. Then you can use pip through python like

python -m pip <pip commands that you want>
like image 31
IngYu Jo Avatar answered Oct 11 '22 07:10

IngYu Jo