问题
I seem to be receiving a unique error in Python 2.7.6 on Windows 8 64bit. I was able to install Python perfectly, then was able to install pip using this guide. But when I got to step 3 and I tried to install virtualenv using pip it gave me this error:
Program 'pip.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1
char:1
+ pip.exe install virtualenv
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ pip.exe install virtualenv
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
Picture:
Also when trying to just run the executable it does this:
I've tried other installation methods such as the pip packaged executable, but it always ends up that whenever it/I get to the stage of actually putting it to use this happens.
Thanks guys, hope you can help!
回答1:
When installed properly, pip
should include C:\Python27\Scripts\pip-script.py
, among a few other scripts. I'm guessing there was some sort of issue when you installed pip the first time, and these scripts weren't placed properly.
As a workaround, try downloading pip from Christoph Gohlke's Python Externsion Packages for Windows repository, which is my go-to resource for installing third-party modules on Windows. The installer should automatically detect your Python installation and install the programs and scripts appropriately.
来源:https://stackoverflow.com/questions/21266185/cannot-use-pythons-pip-on-windows-8-specified-executable-is-not-a-valid-appli