Pygame module import failed to resolve the Pycharm

When you install pygame package, and has seen success in import pygame windows command line interface, as follows

 

 

However, in pycharm introduced import and failed, the following

This is because the Pygame installed by default to the C drive, but in general we pycharm of python files on non-C drive, so go for pycharm join pygame package
to find the installation path of pygame, copy it pygame, pygame-1.9.6.dist-info two can \ PythonProject venv \ Lib \ under \ site-packages directory: folders to project file D python
source file

 

 

Target file location:

 

 Finally, I was able to import the pygame module on Pycharm.

Guess you like

Origin www.cnblogs.com/zykLove/p/12168760.html