3

I installed PyDev in Eclipse to run Python programs, but I’m facing trouble importing simplegui. It is showing me this error:

import simplegui

ImportError: No module named simplegui

My installed PyDev version is 2.7.1.

Olivier Pirson
  • 737
  • 1
  • 5
  • 24
shadhin
  • 41
  • 1
  • 5

4 Answers4

5

You can use SimpleGUICS2Pygame. Just change import simplegui by import SimpleGUICS2Pygame.simpleguics2pygame as simplegui in your CodeSkulptor program and run it in standard Python

Ravdeep
  • 730
  • 1
  • 8
  • 13
4

Did you learn Python using CodeSkulptor? simplegui is a custom module for CodeSkulptor, meaning that it is only available in CodeSkulptor.

More information here.

Ry-
  • 218,210
  • 55
  • 464
  • 476
Jorge Luque
  • 435
  • 1
  • 4
  • 17
  • [Porting from CodeSkulptor to PyGame](http://commondatastorage.googleapis.com/codeskulptor-demos/CS_to_PyGame.html) –  May 25 '13 at 20:51
  • You can use [SimpleGUICS2Pygame](http://simpleguics2pygame.readthedocs.org/). It's a implementation of SimpleGUI to standard Python. – Olivier Pirson May 24 '15 at 21:35
2

I am using a Mac, when I installed simplegui off of the Python website, I had to import it as:

import simpleguitk

I also downloaded it through terminal with the command:

sudo pip install SimpleGUITk
dirtydanee
  • 6,081
  • 2
  • 27
  • 43
Derians
  • 21
  • 4
1

Simple, download simplegui.zip form http://florian-berger.de/en/software/simplegui.

unzip simplegui-x.x.x.zip
cd simplegui-x.x.x
python setup.py install

Replace x.x.x with version number. You might want to run the last step with sudo rights.

Ashoka Lella
  • 6,631
  • 1
  • 30
  • 39
  • C:\Temp\Python>python setup.py install Traceback (most recent call last): File "setup.py", line 23, in import simplegui File "C:\Temp\Python\simplegui.py", line 31, in import Tkinter ImportError: No module named 'Tkinter' – Ixtlan Apr 12 '14 at 02:02
  • 1
    This simplegui is a Python package which has the same name as SimpleGUI of CodeSkulptor, but it is totally something else. [SimpleGUICS2Pygame](http://simpleguics2pygame.readthedocs.org/) is a reimplementation of SimpleGUI to standard Python. – Olivier Pirson May 24 '15 at 21:22