如何安装这个轮子?
How to install this wheel?
我成功安装了 pip,但是当我使用 pip 安装下载的 wheel 时,它打印出:
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 在同一文件夹 (Scripts) 中。
我也尝试使用 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,请帮忙!
使用pip
使用完整路径安装wheel文件:
C:\Python34\Scripts\pip install C:\Python34\Scripts\pygame-1.9.2a0-cp34-none-win_amd64.whl
如果没有路径,名称将被视为必需的,而不是已下载的文件。这应该适用于支持您当前 Python 架构的 wheel 文件。您可以通过以下方式验证您的架构:
C:\Python34\python.exe -c "import distutils.util; print(distutils.util.get_platform())"
这应该打印 win_amd6
。如果它打印 win32
,那么你有一个 32 位 Python 二进制文件,需要选择一个不同的轮子。
为 pip
安装滚轮支持:
pip install wheel
安装下载的轮子:
pip install path/to/pygame-1.9.2a0-cp34-none-win_amd64.whl
我不得不删除 64 位 python 并安装 32 位版本来解决这个问题。
c:\python34\scripts\pip install c:\users\USER\downloads\pygame-1.9.2a0-cp34-none-win32.whl
Unpacking c:\users\USER\downloads\pygame-1.9.2a0-cp34-none-win32.whl
Installing collected packages: pygame
Successfully installed pygame
Cleaning up...
在 32 位上运行良好:)
pip 安装pygame-1.9.2a0-cp27-none-win_amd64.whl
这在我的 Python2.7.3(64 位)计算机上有效,而其他版本无效。
我成功安装了 pip,但是当我使用 pip 安装下载的 wheel 时,它打印出:
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 在同一文件夹 (Scripts) 中。
我也尝试使用 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,请帮忙!
使用pip
使用完整路径安装wheel文件:
C:\Python34\Scripts\pip install C:\Python34\Scripts\pygame-1.9.2a0-cp34-none-win_amd64.whl
如果没有路径,名称将被视为必需的,而不是已下载的文件。这应该适用于支持您当前 Python 架构的 wheel 文件。您可以通过以下方式验证您的架构:
C:\Python34\python.exe -c "import distutils.util; print(distutils.util.get_platform())"
这应该打印 win_amd6
。如果它打印 win32
,那么你有一个 32 位 Python 二进制文件,需要选择一个不同的轮子。
为 pip
安装滚轮支持:
pip install wheel
安装下载的轮子:
pip install path/to/pygame-1.9.2a0-cp34-none-win_amd64.whl
我不得不删除 64 位 python 并安装 32 位版本来解决这个问题。
c:\python34\scripts\pip install c:\users\USER\downloads\pygame-1.9.2a0-cp34-none-win32.whl
Unpacking c:\users\USER\downloads\pygame-1.9.2a0-cp34-none-win32.whl
Installing collected packages: pygame
Successfully installed pygame
Cleaning up...
在 32 位上运行良好:)
pip 安装pygame-1.9.2a0-cp27-none-win_amd64.whl
这在我的 Python2.7.3(64 位)计算机上有效,而其他版本无效。