everything was working fine on my ubuntu machine and suddenly i can't import App
from kivy.app
from kivy.app import App
everything was working fine on my ubuntu machine and suddenly i can't import App
from kivy.app
from kivy.app import App
One of Kivy's internal module weakmethod.py
is trying to import another internal module new.py
. But you have create a new.py
next to where you run python, so Python will try to load yours first. This breaks everything because weakmethod
doesn't expect that your new.py
, it wants the internal new.py
!. The solution is to rename this offending file.
(The actual problem causing ImportError is circular import on the kivy.app
module)
For me, the import error "cannot import name app" was syntax. I replaced app with App and that solved my problem. I was able to re-create, and resolve the issue, by changing the case from lower to upper and vise versa.
Follow this procedure:
Go to kivy website
Go to -> download -> Windows 7, 8, 10 (32/64 bit) Install using pip, follow the instructions here -> installation for Windows
Copy and pasted in CMD->python -m pip install kivy_examples
--> (The examples are installed in the share directory under the root directory where python is installed)
For example C:\Python34\share\kivy-examples\animation
Save all your files in this folder.