Import graphics error

Steven D'Aprano steve at pearwood.info
Tue Apr 5 06:33:18 EDT 2016


On Tue, 5 Apr 2016 08:19 pm, Nicolae Morkov wrote:
> # This program creates a graphics window with a rectangle. It provides the
> 3 # template used with all of the graphical programs used in the book.

What book? 
> *This is the error I get*
>> Traceback (most recent call last):
> File
> "C:/Users/Nicolae/AppData/Local/Programs/Python/Python35/pythonK/pr.py",
> line 1, in <module>
> from graphics import GraphicsWindow
> ImportError: No module named 'graphics'

Okay. So you didn't have the graphics module installed, and the import
failed because the module wasn't installed.
> *And when I installed graphic library the error was :*
>> Traceback (most recent call last):
> File
> "C:/Users/Nicolae/AppData/Local/Programs/Python/Python35/pythonK/pr.py",
> line 1, in <module>
> from graphics import GraphicsWindow
> ImportError: cannot import name 'GraphicsWindow'

How did you install it? Are you sure it is the right module?
-- 
Steven


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /