If you have a good pygame code and when you try to run it in your Pycharm you got the following error”‘No module ‘pygame base'”, then you are not alone.
Follow steps below to fix the problem
- Go to File > Settings
2. You want to uninstall pygame module. In the Settings window, go to Project:<whatever your project name> > Project Interpreter > Select pygame and click the “-” (minus) icon on the right
3. After it is uninstalled, you should see a confirmation message like below “Package ‘pygame’ successfully uninstalled”
4. Now click the “+” (plus) icon on the right and type “pygame” on the search box. Select pygame and click “Install Package”
5. After it is reinstalled, you should see confirmation message like below:
6. Click the X button on the top right corner and then press the OK button.
7. Rerun your code and see if it is fixed. If it is not fixed, try restarting your pycharm.