4

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 と同じフォルダー (スクリプト) にあります。

私も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 を使用しています。助けてください。

4

4 に答える 4

12

フル パスを使用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 バイナリがあり、別のホイールを選択する必要があります。

于 2015-01-26T13:12:52.000 に答える
1

この問題を解決するには、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ビットでうまくいきました:)

于 2015-02-19T10:32:07.660 に答える