Pygame - 导入错误
Pygame - Import Error
我已经下载了 64 位的 pygame,当我尝试导入 pygame 时,我不断收到以下错误。
Traceback (most recent call last):
File "D:\Python\test 2\test_2.py", line 4, in <module>
import pygame
ImportError: No module named 'pygame'
嗯,您需要确保使用 python 下载正确版本的 pygame。尝试重新下载 pygame,当你下载时它应该说它是否在目录中找到正确的 python,如果没有找到版本问题 you/your downloaded/downloading .
备注
According to http://www.pygame.org/download.shtml
NOTE: if you
had pygame 1.7.1 installed already, please uninstall it first. Either
using the uninstall feature - or remove the files:
c:\python25\lib\site-packages\pygame
直接下载 link python
为 python 2.7.11 下载 link ===> Here
直接下载 link pygame
为 pygame 下载 link ===> Here
确保安装正确的 python 版本,pygame version.Dont 混淆两者。
我提供的 links ONLY for windows 而不是任何其他操作系统。
我已经下载了 64 位的 pygame,当我尝试导入 pygame 时,我不断收到以下错误。
Traceback (most recent call last): File "D:\Python\test 2\test_2.py", line 4, in <module> import pygame ImportError: No module named 'pygame'
嗯,您需要确保使用 python 下载正确版本的 pygame。尝试重新下载 pygame,当你下载时它应该说它是否在目录中找到正确的 python,如果没有找到版本问题 you/your downloaded/downloading .
备注
According to http://www.pygame.org/download.shtml
NOTE: if you had pygame 1.7.1 installed already, please uninstall it first. Either using the uninstall feature - or remove the files: c:\python25\lib\site-packages\pygame
直接下载 link python
为 python 2.7.11 下载 link ===> Here
直接下载 link pygame
为 pygame 下载 link ===> Here
确保安装正确的 python 版本,pygame version.Dont 混淆两者。 我提供的 links ONLY for windows 而不是任何其他操作系统。