无法在 Windows 8 上使用 Python 的 pip.“指定的可执行文件不是此操作系统平台的有效应用程序" [英] Cannot use Python's pip on Windows 8. "specified executable is not a valid application for this os platform"

查看:49
本文介绍了无法在 Windows 8 上使用 Python 的 pip.“指定的可执行文件不是此操作系统平台的有效应用程序"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎在 Windows 8 64 位上的 Python 2.7.6 中收到一个独特的错误.我能够完美地安装 Python,然后能够使用 ,但无论何时/我到了实际使用它的阶段.

谢谢大家,希望能帮到你!

解决方案

正确安装后,pip 应该包含 C:\Python27\Scripts\pip-script.py,以及其他一些脚本.我猜你第一次安装 pip 时出现了某种问题,这些脚本没有正确放置.

作为一种解决方法,请尝试从 Christoph Gohlke 的 Python Externsion 下载 pip适用于 Windows 存储库的软件包,这是我在 Windows 上安装第三方模块的首选资源.安装程序应自动检测您的 Python 安装并正确安装程序和脚本.

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

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!

解决方案

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.

这篇关于无法在 Windows 8 上使用 Python 的 pip.“指定的可执行文件不是此操作系统平台的有效应用程序"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆