这个轮子怎么安装? [英] How to install this wheel?

查看:33
本文介绍了这个轮子怎么安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法安装了 pip,但是当我使用 pip 安装下载的轮子时,它会打印:

I managed to install pip but when I use pip to install the downloaded wheel, it prints:

C:Python34Scriptspip install pygame-1.9.2a0-cp34-none-win_amd64.whl
Requirement 'pygame-1.9.2a0-cp34-none-win_amd64.whl' looks like a filename, but the file does not exist
pygame-1.9.2a0-cp34-none-win_amd64.whl is not a supported wheel on this platform

该文件与 pip 位于同一文件夹(Scripts)中.

The file is in the same folder (Scripts) with pip.

我也尝试过使用 wheel 工具:

I did try to use the wheel tool too:

C:Python34Scriptswheel install pygame-1.9.2a0-cp34-none-win_amd64.whl
Traceback (most recent call last):
  File "C:Python34libsite-packageswheel	ool\__init__.py", line 358, in main
    args.func(args)
  File "C:Python34libsite-packageswheel	ool\__init__.py", line 301, in install_f
    args.wheel_dirs, args.force, args.list_files)
  File "C:Python34libsite-packageswheel	ool\__init__.py", line 202, in install
    raise WheelError("No such wheel file: {}".format(req))
wheel.tool.WheelError: No such wheel file: pygame-1.9.2a0-cp34-none-win_amd64.whl
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:Python34lib
unpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:Python34lib
unpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:Python34Scriptswheel.exe\__main__.py", line 9, in <module>
  File "C:Python34libsite-packageswheel	ool\__init__.py", line 361, in main
    sys.stderr.write(e.message + "
")
AttributeError: 'WheelError' object has no attribute 'message'

我使用 PowerShell,请帮忙!

I use PowerShell, please help!

推荐答案

使用pip使用完整路径安装wheel文件:

Use pip to install wheel files using the full path:

C:Python34Scriptspip install C:Python34Scriptspygame-1.9.2a0-cp34-none-win_amd64.whl

如果没有路径,名称将被视为要求而不是已下载的文件.这应该适用于支持您当前 Python 架构的轮文件.您可以通过以下方式验证您的架构:

Without the path the name is seen as a requirement rather than a already-downloaded file. This should work for wheel files that support your current Python architecture. You can verify your architecture with:

C:Python34python.exe -c "import distutils.util; print(distutils.util.get_platform())"

这应该打印 win_amd6.如果它改为打印 win32,则您有一个 32 位 Python 二进制文件,需要选择不同的轮子.

This should print win_amd6. If it prints win32 instead, you have a 32-bit Python binary and need to pick a different wheel.

这篇关于这个轮子怎么安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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