简体   繁体   中英

Pygame error: No module named 'pygame.base'

I'm using Python 3.5, and the version of pygame designed for it. I have now installed pygame, by converting to zip and moving the files like in this video here . However when I run the command import pygame , the error ImportError: No module named 'pygame.base' appears.

Using this method of installation has worked fine in the past, but ever since getting a new PC, isn't working. What is wrong, and how do I fix the problem?

Edit:

I tried using the answer found on Game Dev SE , however this gave me the error: not a supported wheel on this platform

The version of pygame I'm trying to install is: pygame-1.9.2a0-cp35-none-win_amd64.whl . Which can be found here .

This is for windows 10 64 bit. Run the 64 bit python as administrator it should import pygame without problem. It worked for me Make sure pygame folder is copied under C:\\Program Files\\Python35\\Lib\\site-packages\\ before you start python

尝试使用 pip3 install pygames 安装 pygames

pip3 install pygame

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM