Pygame installation tutorial

1, python --version Python version installed to view,

  View pip pip --version version installed,

  Upgrade pip command: python -m pip install --upgrade pip 

  If you have downloaded the installation file to use: pip install the file name

  If you do not download it using: python -m pip install --user name of the module, the system automatically downloads

2, if there is no pip install, install pip. URL is: https: //pypi.python.org/pypi/pip#downloads

  

  Download the second line, after decompression, run setup.py.

  Now open cmd, view the installed version pip, pip has now completed the installation.

  Enter cmd pip list, you will see all installed packages pip. 

3、下载pygame:http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

  cp27 representatives python2.7 version, win32 on behalf of 32-bit operating system. I was python3.7, the system is 64-bit, so I downloaded

  pygame-1.9.4-cp37-cp37m-win_amd64.whl

  Download file name suffix is ​​whl, so the next step is to run the installation program whl file.

4. Wheel mounting, enter cmd, enter the command: pip install wheel

5, enter the directory .whl files in cmd, my file on (E: \ Python \ pygame),

  Entered as follows: In the cmd command input to enter the E disk :( E), and enter cd E: \ Python \ pygame, and finally enter the pip install pygame-1.9.4-cp37-cp37m-win_amd64.whl

6, see the installation was successful, cmd, enter Python, then type import pygame

7, PyCharm editor, the editor in this case can not use the pygame, what needs to be installed in the set,

  Open the settings-project interpreter, did not find in the project Interpreter in pygame, the right point +, search pagame, click on the lower left corner of the installation, after the installation of other modules, as well.

1, python --version Python version installed to view,

  View pip pip --version version installed,

  Upgrade pip command: python -m pip install --upgrade pip 

  If you have downloaded the installation file to use: pip install the file name

  If you do not download it using: python -m pip install --user name of the module, the system automatically downloads

2, if there is no pip install, install pip. URL is: https: //pypi.python.org/pypi/pip#downloads

  

  Download the second line, after decompression, run setup.py.

  Now open cmd, view the installed version pip, pip has now completed the installation.

  Enter cmd pip list, you will see all installed packages pip. 

3、下载pygame:http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

  cp27 representatives python2.7 version, win32 on behalf of 32-bit operating system. I was python3.7, the system is 64-bit, so I downloaded

  pygame-1.9.4-cp37-cp37m-win_amd64.whl

  Download file name suffix is ​​whl, so the next step is to run the installation program whl file.

4. Wheel mounting, enter cmd, enter the command: pip install wheel

5, enter the directory .whl files in cmd, my file on (E: \ Python \ pygame),

  进入方法如下:在cmd中输入指令E:(先进入E盘),然后输入cd E:\Python\pygame,最后输入pip install pygame-1.9.4-cp37-cp37m-win_amd64.whl

6、查看安装是否成功,cmd中输入Python,然后输入import pygame

7、编辑器pycharm,此时在编辑器中还不能使用pygame,需要在设置中安装一下,

  打开settings-project interpreter,发现在project Interpreter中没有pygame,点右边的+,搜索pagame,点击左下角的安装,以后安装其他模块,也是如此。

Guess you like

Origin www.cnblogs.com/pengzhi12345/p/12123791.html