如何安装此轮? [英] How to install this wheel?

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

问题描述

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

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

C:\Python34\Scripts\pip 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位于同一文件夹(脚本)中.

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

我也尝试过使用wheel工具:

C:\Python34\Scripts\wheel install pygame-1.9.2a0-cp34-none-win_amd64.whl
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\wheel\tool\__init__.py", line 358, in main
    args.func(args)
  File "C:\Python34\lib\site-packages\wheel\tool\__init__.py", line 301, in install_f
    args.wheel_dirs, args.force, args.list_files)
  File "C:\Python34\lib\site-packages\wheel\tool\__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:\Python34\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python34\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python34\Scripts\wheel.exe\__main__.py", line 9, in <module>
  File "C:\Python34\lib\site-packages\wheel\tool\__init__.py", line 361, in main
    sys.stderr.write(e.message + "\n")
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:\Python34\Scripts\pip install C:\Python34\Scripts\pygame-1.9.2a0-cp34-none-win_amd64.whl

在没有路径的情况下,名称被视为必需项,而不是已下载的文件.这应该适用于支持您当前的Python体系结构的wheel文件.您可以使用以下方法来验证您的架构:

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:\Python34\python.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天全站免登陆