Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › [kinda solved] Turtle Graphics probs in both the command line and Eclipse (python 3.2.2/3.0, UBUNTU)
New Posts  All Forums:Forum Nav:

[kinda solved] Turtle Graphics probs in both the command line and Eclipse (python 3.2.2/3.0, UBUNTU)

post #1 of 2
Thread Starter 
sup fellas, it's been a while since I even bothered taking time for this problem on my ubuntu OS, but I guess it needs a fix.
There's no rush to fix it or anything, I've had my python programming exam already, using C++ now ;p I haven't got any assignement deadlines or anything in python, just want to get this to work.

The problem lies in the tk-graphics package, which is installed (but probably not properly) but gives errors when using turtle graphics.

The output in my command line (using: python3 main.py) throws this back at me:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 7, in
from field import Field
File "/home/ulli_x64/workspace/Location/src/field.py", line 8, in
import turtle
File "/usr/lib/python3.2/turtle.py", line 107, in
import tkinter as TK
File "/usr/lib/python3.2/tkinter/__init__.py", line 42, in
raise ImportError(str(msg) + ', please install the python-tk package')
ImportError: No module named _tkinter, please install the python-tk package


When I try to use 'sudo apt-get install python-tk' it says it has already been installed, so yeah that makes you scratch the head, doesn't it ;p haha.


I mostly program pydev modules in eclipse. My eclipse manages to draw screens etcetc, but only gives a problem when I use 'wn.mainloop' (or self.wn.mainloop) to maintain the screen even after calculations smile.gif. It makes eclipse shout something like this:

Traceback (most recent call last):
File "/home/ulli_x64/workspace/Location/src/main.py", line 24, in
field.init_draw()
File "/home/ulli_x64/workspace/Location/src/field.py", line 92, in init_draw
self.wn = self.turtle.Screen()
AttributeError: 'Turtle' object has no attribute 'Screen'


As far as I know, all turtle objects have the .Screen attribute built in...
You may ask how I completed these assignements: used freakin' Windows to install eclipse and program python there biggrin.gif. The strange things is: my code works perfectly fine on my windows' eclipse AND on my university's library computers ! So it has to be a wrong installation of some sort.


Thanks for reading and would be great to get a fix for it smile.gif I prefer Ubuntu for programming....all those packages in windows get damn messy.. wink.gif

ps: if you need some code, welcome to ask , I'll just post a pastebin link asap (y)
Edited by Ollii - 2/15/12 at 8:24am
Obsidian
(19 items)
 
Family box
(15 items)
 
 
CPUMotherboardGraphicsRAM
[Intel] i5-2500k @ 4.0 Ghz [Asus] p8p67 Pro [MSI] N580GTX Lightning Xtreme [G.skill] RipjawsZ 16Gb (4Gbx4) CL8 1600Mhz  
Hard DriveHard DriveCoolingCooling
[Samsung] Spinpoint F3 1TB [Seagate] 7200.10 2x320GB [RAID0] [Noctua] NH-D14 [CPU cooler] [MSI] Twin Frozr III [GPU cooler] 
CoolingCoolingOSMonitor
[CM] R4-L2R-20AC-GP blue LED (3x) [Case fans] [Zalman] ZM-MFC1 Plus [Fan controller] Windows 10 Pro [Acer] GR235Hbmii & [Medion] Life P12037 (MD 21... 
KeyboardPowerCaseMouse
[Ducky] Shine 3 DK9008, MX Brown, white LED [Corsair] AX850 [Corsair] Obsidian 650D [Logitech] MX Master 
Mouse PadAudioAudio
[SteelSeries] QcK mini Creative Integrated 
CPUMotherboardGraphicsRAM
[Intel] i5-660 @ 3.33Ghz [Gigabyte] GA-Q57M-S2H [EVGA] GTX560ti 2048Mb  [Samsung] 4GB (2x2GB) CL9 1333Mhz 
RAMOptical DriveCoolingCooling
[Corsair] 4GB (2x2GB) CL9 1333Mhz [Asus] BC-12B1ST (blu-ray) [Antec] 4x TriCool fans (140mm) [Corsair] stock fan (120mm) 
OSMonitorMonitorPower
Windows 8.1 Pro [Panasonic] Viera [Acer] p221w 22" [Corsair] TX550M 
CaseAudioOther
[Antec] Three Hundred integrated [OCZ] Vertex 3 120GB 
CPUMotherboardGraphicsRAM
[Intel] i5-3210m @ 2.5Ghz [Lenovo] Intel Ivy Bridge chipset [Intel] HD 4000 [Samsung] 1600Mhz 8Gb (2x4) PC12800-CL11 
Hard DriveHard DriveOptical DriveCooling
[Toshiba] 500Gb 7200rpm [WD] MyPassport 500Gb 5400rpm usb3.0 [LG] HL-DT-ST GT50N DVD+-RW [Lenovo] stock cooling 
OSOSMonitorKeyboard
Windows 10 Pro Ubuntu 15.10 Wily Werewolf 15.6" HD+ 1600x900 Anti-glare Lenovo keyboard <3 
PowerAudio
6 Cell Li-Ion 70+ Integrated 
  hide details  
Reply
Obsidian
(19 items)
 
Family box
(15 items)
 
 
CPUMotherboardGraphicsRAM
[Intel] i5-2500k @ 4.0 Ghz [Asus] p8p67 Pro [MSI] N580GTX Lightning Xtreme [G.skill] RipjawsZ 16Gb (4Gbx4) CL8 1600Mhz  
Hard DriveHard DriveCoolingCooling
[Samsung] Spinpoint F3 1TB [Seagate] 7200.10 2x320GB [RAID0] [Noctua] NH-D14 [CPU cooler] [MSI] Twin Frozr III [GPU cooler] 
CoolingCoolingOSMonitor
[CM] R4-L2R-20AC-GP blue LED (3x) [Case fans] [Zalman] ZM-MFC1 Plus [Fan controller] Windows 10 Pro [Acer] GR235Hbmii & [Medion] Life P12037 (MD 21... 
KeyboardPowerCaseMouse
[Ducky] Shine 3 DK9008, MX Brown, white LED [Corsair] AX850 [Corsair] Obsidian 650D [Logitech] MX Master 
Mouse PadAudioAudio
[SteelSeries] QcK mini Creative Integrated 
CPUMotherboardGraphicsRAM
[Intel] i5-660 @ 3.33Ghz [Gigabyte] GA-Q57M-S2H [EVGA] GTX560ti 2048Mb  [Samsung] 4GB (2x2GB) CL9 1333Mhz 
RAMOptical DriveCoolingCooling
[Corsair] 4GB (2x2GB) CL9 1333Mhz [Asus] BC-12B1ST (blu-ray) [Antec] 4x TriCool fans (140mm) [Corsair] stock fan (120mm) 
OSMonitorMonitorPower
Windows 8.1 Pro [Panasonic] Viera [Acer] p221w 22" [Corsair] TX550M 
CaseAudioOther
[Antec] Three Hundred integrated [OCZ] Vertex 3 120GB 
CPUMotherboardGraphicsRAM
[Intel] i5-3210m @ 2.5Ghz [Lenovo] Intel Ivy Bridge chipset [Intel] HD 4000 [Samsung] 1600Mhz 8Gb (2x4) PC12800-CL11 
Hard DriveHard DriveOptical DriveCooling
[Toshiba] 500Gb 7200rpm [WD] MyPassport 500Gb 5400rpm usb3.0 [LG] HL-DT-ST GT50N DVD+-RW [Lenovo] stock cooling 
OSOSMonitorKeyboard
Windows 10 Pro Ubuntu 15.10 Wily Werewolf 15.6" HD+ 1600x900 Anti-glare Lenovo keyboard <3 
PowerAudio
6 Cell Li-Ion 70+ Integrated 
  hide details  
Reply
post #2 of 2
Thread Starter 
BUMP !
Obsidian
(19 items)
 
Family box
(15 items)
 
 
CPUMotherboardGraphicsRAM
[Intel] i5-2500k @ 4.0 Ghz [Asus] p8p67 Pro [MSI] N580GTX Lightning Xtreme [G.skill] RipjawsZ 16Gb (4Gbx4) CL8 1600Mhz  
Hard DriveHard DriveCoolingCooling
[Samsung] Spinpoint F3 1TB [Seagate] 7200.10 2x320GB [RAID0] [Noctua] NH-D14 [CPU cooler] [MSI] Twin Frozr III [GPU cooler] 
CoolingCoolingOSMonitor
[CM] R4-L2R-20AC-GP blue LED (3x) [Case fans] [Zalman] ZM-MFC1 Plus [Fan controller] Windows 10 Pro [Acer] GR235Hbmii & [Medion] Life P12037 (MD 21... 
KeyboardPowerCaseMouse
[Ducky] Shine 3 DK9008, MX Brown, white LED [Corsair] AX850 [Corsair] Obsidian 650D [Logitech] MX Master 
Mouse PadAudioAudio
[SteelSeries] QcK mini Creative Integrated 
CPUMotherboardGraphicsRAM
[Intel] i5-660 @ 3.33Ghz [Gigabyte] GA-Q57M-S2H [EVGA] GTX560ti 2048Mb  [Samsung] 4GB (2x2GB) CL9 1333Mhz 
RAMOptical DriveCoolingCooling
[Corsair] 4GB (2x2GB) CL9 1333Mhz [Asus] BC-12B1ST (blu-ray) [Antec] 4x TriCool fans (140mm) [Corsair] stock fan (120mm) 
OSMonitorMonitorPower
Windows 8.1 Pro [Panasonic] Viera [Acer] p221w 22" [Corsair] TX550M 
CaseAudioOther
[Antec] Three Hundred integrated [OCZ] Vertex 3 120GB 
CPUMotherboardGraphicsRAM
[Intel] i5-3210m @ 2.5Ghz [Lenovo] Intel Ivy Bridge chipset [Intel] HD 4000 [Samsung] 1600Mhz 8Gb (2x4) PC12800-CL11 
Hard DriveHard DriveOptical DriveCooling
[Toshiba] 500Gb 7200rpm [WD] MyPassport 500Gb 5400rpm usb3.0 [LG] HL-DT-ST GT50N DVD+-RW [Lenovo] stock cooling 
OSOSMonitorKeyboard
Windows 10 Pro Ubuntu 15.10 Wily Werewolf 15.6" HD+ 1600x900 Anti-glare Lenovo keyboard <3 
PowerAudio
6 Cell Li-Ion 70+ Integrated 
  hide details  
Reply
Obsidian
(19 items)
 
Family box
(15 items)
 
 
CPUMotherboardGraphicsRAM
[Intel] i5-2500k @ 4.0 Ghz [Asus] p8p67 Pro [MSI] N580GTX Lightning Xtreme [G.skill] RipjawsZ 16Gb (4Gbx4) CL8 1600Mhz  
Hard DriveHard DriveCoolingCooling
[Samsung] Spinpoint F3 1TB [Seagate] 7200.10 2x320GB [RAID0] [Noctua] NH-D14 [CPU cooler] [MSI] Twin Frozr III [GPU cooler] 
CoolingCoolingOSMonitor
[CM] R4-L2R-20AC-GP blue LED (3x) [Case fans] [Zalman] ZM-MFC1 Plus [Fan controller] Windows 10 Pro [Acer] GR235Hbmii & [Medion] Life P12037 (MD 21... 
KeyboardPowerCaseMouse
[Ducky] Shine 3 DK9008, MX Brown, white LED [Corsair] AX850 [Corsair] Obsidian 650D [Logitech] MX Master 
Mouse PadAudioAudio
[SteelSeries] QcK mini Creative Integrated 
CPUMotherboardGraphicsRAM
[Intel] i5-660 @ 3.33Ghz [Gigabyte] GA-Q57M-S2H [EVGA] GTX560ti 2048Mb  [Samsung] 4GB (2x2GB) CL9 1333Mhz 
RAMOptical DriveCoolingCooling
[Corsair] 4GB (2x2GB) CL9 1333Mhz [Asus] BC-12B1ST (blu-ray) [Antec] 4x TriCool fans (140mm) [Corsair] stock fan (120mm) 
OSMonitorMonitorPower
Windows 8.1 Pro [Panasonic] Viera [Acer] p221w 22" [Corsair] TX550M 
CaseAudioOther
[Antec] Three Hundred integrated [OCZ] Vertex 3 120GB 
CPUMotherboardGraphicsRAM
[Intel] i5-3210m @ 2.5Ghz [Lenovo] Intel Ivy Bridge chipset [Intel] HD 4000 [Samsung] 1600Mhz 8Gb (2x4) PC12800-CL11 
Hard DriveHard DriveOptical DriveCooling
[Toshiba] 500Gb 7200rpm [WD] MyPassport 500Gb 5400rpm usb3.0 [LG] HL-DT-ST GT50N DVD+-RW [Lenovo] stock cooling 
OSOSMonitorKeyboard
Windows 10 Pro Ubuntu 15.10 Wily Werewolf 15.6" HD+ 1600x900 Anti-glare Lenovo keyboard <3 
PowerAudio
6 Cell Li-Ion 70+ Integrated 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › [kinda solved] Turtle Graphics probs in both the command line and Eclipse (python 3.2.2/3.0, UBUNTU)