Meaning that when I run from the command line something like:



pip install somelib

windows runs them in a new cmd window instead of in the current window. therefor if there is an error message I usually can't see it since the window closes.

I can run (most) python scripts inlined if I use the long version like:

python pip-script.py install somelib

but this is very cumbersome and not every python tool exe has a -script.py version.

how can this be solved? thanks for the help


I have Windows 7 Home Premium and I do not experience this same behavior anymore, although some of them did cause some headaches. If you can get a distribution of python that has compiled .exe wrappers for the power-tools, I would try to do this (I never call pip.py, I have a pip.exe that executes in cmd.exe right out of the box).

Most notably, take care when executing .bat files that wrap up your scripts. BAT files will do what you described if not set up properly. Instead of using BAT files, I prefer to make links. Then you can set the target manually and other execution characteristics.

If you are having trouble with a particular command, you will probably need to track down the actual target of your command, and see how it is being run. Some pythons wrap up modules in .BATs, and they can behave wrong if you don't realize this.

One last thing, running commands from the Run-Prompt IS NOT THE SAME as running from cmd.exe. I don't know the exact differences, I just know that it generally does not work.

Edit:: If you are in cmd.exe, and you type 'python', what happens?

  • this led in the right direction, hence the upvote (also an upvote for a new user, trying to help the community). but there are no bat files here, atleast not visiblity to me – alonisser Apr 16 '13 at 10:00

Run the commands from an elevated command prompt (Start / Type "cmd" / right-click cmd.exe / Run as administrator). If they still open a new window, it's likely that's what they're hard coded to do.

  • THat doesn't work, but I'm quite sure this isn't hard coded since in win xp It didn't behave that way – alonisser Dec 6 '12 at 7:26

Solved this by self. seems that the pip.exe file installed by default (in python27\scripts) behaves like this for some reason, also it supposed to only be a pip-script.py wrapper (I think). but copying a pip.exe file from a virtualenv scripts folder into the main python scripts folder just works.. and as least as I could check (`pip --version) It refers to the default python install and not to the one inside the virtualenv. makes me smile

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.