![]() |
IDLE not importing pygame (ok outside of IDLE) - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: IDLE not importing pygame (ok outside of IDLE) (/thread-12825.html) |
IDLE not importing pygame (ok outside of IDLE) - miner_tom - Sep-14-2018 I do have pygame installed on my ubuntu 16.04 system. I know this because when I run the program outside of IDLE (or IDLE3) I get the following from a .py file with nothing but "import pygame" in it. "pygame 1.9.4 Hello from the pygame community. https://www.pygame.org/contribute.html" However, when I run the same file from a shell invoked from within IDLE I get "Traceback (most recent call last): File "/home/tom/Downloads/projects/ZenvaCourse/Variables_Text.py", line 1, in <module> import pygame File "/usr/local/lib/python3.6/dist-packages/pygame/__init__.py", line 136, in <module> from pygame.base import * ImportError: No module named base" I have not found a solution so far. Thank You Tom RE: IDLE not importing pygame (ok outside of IDLE) - Larz60+ - Sep-14-2018 simple answer. Don't use IDLE. It;s not a good IDE (if you can call it that), and I don't know why python.org keeps including it as part of the package. You should consider: my choices in order: VSCode: (Not to be confused with Visual Studio) or PyCharm: or perhaps another: |