0

I'm using Pygame and livewire to practice some basic graphics manipulation.

I run into a little error:

    RESTART: C:\Users\Timothy\AppData\Local\Programs\Python\Python35-32\Scripts\NewWindow.py 
Traceback (most recent call last):
    File "C:\Users\Timothy\AppData\Local\Programs\Python\Python35-32\Scripts\NewWindow.py", line 4, in <module>
    from livewires import games
ImportError: cannot import name 'games'

My code is merely:

from livewires import games

games.init(screen_width = 640, screen_height = 480, fps = 50)

games.screen.mainloop()

I currently have pygames and livewire in my Lib folder under python.

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Timothy Jao
  • 13
  • 1
  • 3
  • 2
    Did you name any files `livewires.py` or name any folders `livewires`? – user2357112 Jul 10 '16 at 00:50
  • I did but I tried renaming them and the same error appeared. – Timothy Jao Jul 10 '16 at 01:34
  • Post your full directory structure, including file names such as `__init__.py` – Selcuk Jul 10 '16 at 02:22
  • So in my python folder under Lib, I have my livewires folder. Under that I have _pycache_, build, a folder called livewires2, a readme text file and a setup file in both python and batch. Under _pycache_ is a python file called games.cpython-35. Under build is a folder called lib with a folder called livewires1 with the python files * `__init__`, games and color. Under the livewires2 file is `__init__`, games and color python files. – Timothy Jao Jul 10 '16 at 23:25

0 Answers0