python3.4的pygame安裝__python

來源:互聯網
上載者:User

確定你的python版本後,才能進行下面的步驟:

1.進入官網http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame  下載對應版本的pygame,注意區分32位與64位。

    這裡wheel是一種便於python安裝的壓縮格式。












2.進入cmd模式安裝pip

 通過快速鍵win+R (或者在開始菜單中輸入cmd)進如cmd模式


預設是C盤,但是安裝時需要切換到具體目錄




















通過cd就切換過去了,再進行pip install whell,會提示pip 版本過低,需要upgrade,那就更新




更新輸入pip install --upgrade pip,如圖更新完畢。










3.在cmd安裝wheel

還是在Script目錄下,輸入pip install wheel

 







4.確認下是否安裝到位

輸入pip list 

顯示 pip(9.0.1)

setuptools(12.0.5)

wheel (0.29.0)

說明全部安裝好了

5.安裝pygame

將下載好的pygame檔案放置在Script的檔案夾裡

在cmd視窗中輸入pip pygame-1.9.3-cp34m-win32.whl(版本不同,只需要變化檔案的名字而已)





6.檢驗是否安裝到位

在Python IDLE中輸入import pygame和pygame.ver兩條語句,即可知道結果


以上就是這些,謝謝~

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.