0

Trying to learn python. Chapter 4 of Think Python by Allen Downey requires you to download package from thinkpython.com/swampy. Had trouble implementing the directions on the website, so I copied Swampy to it's own directory.

from swampy.TurtleWorld import *
world=TurtleWorld()

works in the interactive environment. But when I write a script and attempt to run it, python crashes and I need to re-start the kernel. Other posts on this topic suggest modifying the user path, setting Canopy as the default python environment. I'm sharing a computer (Mac Mavericks 10.9.5) and would like to to the exercises in the book w/o changing anything that will effect the other users of this computer. I'm afraid that if I change the default python setting I'll mess it up for other users.

Q: How do I import and run on my own mac user account w/o changing defaults of other users?

4

1 回答 1

0

此问题和解决方案在https://support.enthought.com/entries/21793229-Using-Tkinter-Turtle-or-Pyglet-in-Canopy-s-IPython-panel的 Enthought 支持知识库中进行了描述。

作为旁注,您根本不需要更改默认 Python。如果您确实想在终端中运行 Canopy Python,虽然它不是解决您的问题所必需的,但它确实很有用,只需转到 Canopy 工具菜单并打开一个 Canopy 终端。

于 2014-11-20T04:26:14.873 回答