import graphics library; causes error
Terry Reedy
tjreedy at udel.edu
Sun Nov 16 18:09:58 EST 2014
On 11/16/2014 3:39 PM, ryguy7272 wrote:
> These libraries drive me totally nuts. Sorry, just had to get it out there.
> Anyway, I open the cmd window, and typed this:
> 'easy_install python graphics'.
In what directory?
> So, it starts up and runs/downloads the appropriate library from the web.
> I get confirmation (in the cmd window) that it finishes, then I try
to run this script.
>
> # futval_graph2.py
> from graphics import *
> def main():
[snip 20 lines of 2.x code (it used raw_input)]
> After I hit F5, I get this:
> Traceback (most recent call last):
> File "C:\Users\Ryan\Desktop\Graphics_Test.py", line 2, in <module>
> from graphics import *
> ImportError: No module named graphics
After opening Idle, I would first try
>>> import graphics
in the shell before entering any code. When that failed, I would look
in lib/site-packages to see the actual module or package name installed,
and maybe look in the doc for the package about how to import it.
--
Terry Jan Reedy
More information about the Python-list
mailing list