I'm following a youtube tutorial that gives an introduction to kivy and apps made in python.
I'm using pycharm and I'm meant to get a text box appear once my script has run. My script:
import kivy
from kivy.app import App
from kivy.uix.button import Label
import pillow
import image
class MyApp(App):
def build(self):
return Label(text='Hello Kivy')
if __name__ == '__main__':
MyApp().run()
I've added import pillow / image
because I found questions on SO that had the same issue I had so I've managed to sort that error and now encountered a new error which I have no idea what to do.
The SO questions:
My Error is:
Traceback (most recent call last):
File "C:/Users/xxxx/PycharmProjects/MyProject/App test.py", line 4, in <module>
import pillow
ModuleNotFoundError: No module named 'pillow'
I've put import pillow
at the top and also added the module in pycharm (file > settings > +
) and on command prompt pip install pillow
so why is "No module named 'pillow'" appearing?. So what do I have to do for this text box to appear? The youtube video can show what is meant to happen to be more clearer (skip to (9:50)). Thanks
Full Error:
C:\Users\xxxx\PycharmProjects\MyProject\venv\Scripts\python.exe "C:/Users/xxxx/PycharmProjects/MyProject/App test1.py"
[INFO ] [Logger ] Record log in C:\Users\xxxx\.kivy\logs\kivy_20-06-03_87.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\xxxx\PycharmProjects\MyProject\venv\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 11:52:54) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\xxxx\PycharmProjects\MyProject\venv\Scripts\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - ImportError: DLL load failed: The specified module could not be found.
File "C:\Users\xxxx\PycharmProjects\MyProject\venv\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\xxxx\PycharmProjects\MyProject\venv\lib\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
[CRITICAL] [App ] Unable to get a Window, abort.