4

How to run pip on windows?

I understand, that it may be very silly question, but all guides, entire web have same:

$ pip install <package>

But where should I find this "$"? It is not Windows console. It is not Python console. It is not different combinations of them. Where should I find this magical "$" on Windows?

Arkady
  • 1,830
  • 2
  • 20
  • 42
  • $ is in terminal on linux and mac OS's: http://linuxcommand.org/images/Screenshot-Terminal.png – kylieCatt May 23 '14 at 15:04
  • Thank you, but there is a lot of words about "it works on windows", and no example "how it works on windows" :-) That is my question, how run it on Windows. – Arkady May 23 '14 at 15:06
  • Try easy_install. It basically is the same thing and works in windows. – AHuman May 23 '14 at 15:06
  • @AHuman what for is this useful topic http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows about "how to install" if it is not possible to use? – Arkady May 23 '14 at 15:08
  • Also PyCharm somehow use it successfully and even gives UI for that. So, there have to be terminal command, I guess. – Arkady May 23 '14 at 15:10
  • 1
    Run it in your command line. Win+R, type `cmd` and hit enter. That brings up the console. Type `pip install ` and ta-da. – Adam Smith May 23 '14 at 15:12
  • @Arkady I was showing you something that I use, that is really easy to set up. All you have to do is go into your terminal and type: `easy_install ______` – AHuman May 23 '14 at 15:13
  • 2
    @AHuman `easy_install` is like pip's little brother. `easy_install pip` and use pip :) – Adam Smith May 23 '14 at 15:13
  • @AdamSmith "'pip' is not recognized as an internal or external command, operable program or batch file." As I wrote in my post, all combinations of trying to run it from win console or python console didn't gave result. – Arkady May 23 '14 at 15:14
  • @Arkady you may need to add it to your path then. IIRC `pip` installs in your python/site-packages folder but I may be wrong. EDIT: I'm wrong, see my further comment. – Adam Smith May 23 '14 at 15:16
  • @AdamSmith, I already checked that, there exists pip package, but it has no executable file. – Arkady May 23 '14 at 15:17
  • @AHuman, I started, but still I hope someone used pip from Windows :-) – Arkady May 23 '14 at 15:18
  • @Arkady oops it's `C:\Python\scripts` – Adam Smith May 23 '14 at 15:18
  • @Arkady That does work to use easy_install to install pip. – AHuman May 23 '14 at 15:19
  • 1
    @AHuman he's already installed `pip`. He's asking how to USE it, not how to install it. I misunderstood as well. – Adam Smith May 23 '14 at 15:20
  • 1
    @AHuman, I found "easy_install.py" in my site-packages directory, and run it, it works. :-) Thank you :-) – Arkady May 23 '14 at 15:24

1 Answers1

6

When you install pip (via get-pip.py or etc) it installs into your python directory in the subfolder \Lib\site-packages. It also puts a pip.exe in your %python%\scripts folder. If you add C:\python-install-directory\scripts to your PATH you should be able to run it from the command line:

$ pip install <package>

The $ you see is the standard *nix terminal. Windows uses a > after the working directory, *nix uses a $. It is safely ignored.

Adam Smith
  • 45,072
  • 8
  • 62
  • 94
  • Sometimes on Windows you also need to run the command console with Administrator privileges. I have no idea when this is required, only that if running it with user privileges leads to problems, it's worth trying to run as Administrator. – omatai Jan 22 '18 at 02:13