Jul-06-2018, 05:33 PM
(This post was last modified: Jul-06-2018, 06:08 PM by benniehanas.)
I have an issue getting TurtleWorld to work for my book "ThinkPython" for version 3.6. I cannot get it to work in pycharm or on my terminal CLI. These are my errors:
cha-105889-l:swampy-2.1.7 username$ pip3 install swampy
Requirement already satisfied: swampy in /usr/local/lib/python3.6/site-packages (2.1.7)
cha-105889-l:swampy-2.1.7 username$ python3
Python 3.6.4 (default, Mar 22 2018, 14:05:57)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import tkinter
>>> import swampy.TurtleWorld
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/blamb/Downloads/swampy-2.1.7/swampy/TurtleWorld.py", line 8, in <module>
from Tkinter import TOP, BOTTOM, LEFT, RIGHT, END, LAST, NONE, SUNKEN
ModuleNotFoundError: No module named 'Tkinter'
>>>
>>>
>>> import swampy
>>>
>>>
>>> from TurtleWorld import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'TurtleWorld'
>>>
>>>
This is the code from pycharm:
/Users/blamb/PycharmProjects/ThinkPython/venv/bin/python /Users/blamb/PycharmProjects/ThinkPython/Turtle.py
Traceback (most recent call last):
File "/Users/blamb/PycharmProjects/ThinkPython/Turtle.py", line 1, in <module>
from TurtleWorld import *
ModuleNotFoundError: No module named 'TurtleWorld'
Process finished with exit code 1
cha-105889-l:swampy-2.1.7 username$ pip3 install swampy
Requirement already satisfied: swampy in /usr/local/lib/python3.6/site-packages (2.1.7)
cha-105889-l:swampy-2.1.7 username$ python3
Python 3.6.4 (default, Mar 22 2018, 14:05:57)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import tkinter
>>> import swampy.TurtleWorld
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/blamb/Downloads/swampy-2.1.7/swampy/TurtleWorld.py", line 8, in <module>
from Tkinter import TOP, BOTTOM, LEFT, RIGHT, END, LAST, NONE, SUNKEN
ModuleNotFoundError: No module named 'Tkinter'
>>>
>>>
>>> import swampy
>>>
>>>
>>> from TurtleWorld import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'TurtleWorld'
>>>
>>>
This is the code from pycharm:
/Users/blamb/PycharmProjects/ThinkPython/venv/bin/python /Users/blamb/PycharmProjects/ThinkPython/Turtle.py
Traceback (most recent call last):
File "/Users/blamb/PycharmProjects/ThinkPython/Turtle.py", line 1, in <module>
from TurtleWorld import *
ModuleNotFoundError: No module named 'TurtleWorld'
Process finished with exit code 1