簡體   English   中英

無法通過 pip 在 Python 上安裝 pygame(Windows 10)

[英]Unable to install pygame on Python via pip (Windows 10)

目前無法通過pip 安裝 Pygame

pip install pygame

收到此消息:

擔心它被稱為 EOF 錯誤,這是模塊本身的錯誤嗎?

目前有dev版本可用。 讓他們通過

pip install pygame==2.0.0.dev6

Pygame 目前與 Python 3.8 不兼容。 我建議您降級回 3.7 並在那里安裝 pip。

pip 沒有 pygame。 但是有一個替代方案對我有用。 https://www.pygame.org/wiki/CompileWindows正確閱讀並按照步驟操作,它應該會安裝。 您還需要將代碼更新為 pygame 2.0.0 代碼,因為它僅適用於 3.8 BTW,您必須遵循 SDL2 指令,因為 pygame 2.0.0 使用它。

以上命令在今天 3 月 15 日 20 日為我工作,在 Linux Mint 19 上使用 Python-3-8-0 讓 IDLE 識別 pygame。

sudo pip3 install pygame==2.0.0.dev6

我還必須先更新 pip

sudo pip3 install --upgrade pip

Pygame 需要 Visual Studio C++ 構建工具來安裝。 確保您已從此處下載這些內容。

Open power shell window and make sure your internet is on Then type the following command pip install pygame It will automatically download it for you and also install it Again make sure your internet is on I have python 3.8.2 and it worked on my pc

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM