I installed kivy and pygame to python and tried to run this:
import kivy
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text="fcguh")
if __name__ == "__main__":
MyApp().run()
It displayed an error message saying "No module named 'kivy'".
Then I tried to find the solutions on the Internet and did something I can't recall and the error message became like this:
[INFO ] [Logger ] Record log in C:\Users\dekmeymey\.kivy\logs\kivy_19-06-12_4.txt
[INFO ] [Kivy ] v1.11.0
[INFO ] [Kivy ] Installed at "C:\Users\dekmeymey\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\dekmeymey\AppData\Local\Programs\Python\Python37\pythonw.exe" [INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored)
[CRITICAL] [Text ] Unable to find any valuable Text 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\dekmeymey\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0) File "C:\Users\dekmeymey\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\text\text_sdl2.py", line 13, in <module>
from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents,
pil - ModuleNotFoundError: No module named 'PIL' File "C:\Users\dekmeymey\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0) File "C:\Users\dekmeymey\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\text\text_pil.py", line 7, in <module>
from PIL import Image, ImageFont, ImageDraw
[CRITICAL] [App ] Unable to get a Text provider, abort.
I tried installing kivy again in case if I missed anything but nothing changes. Can anybody help? I have a school project to complete.
Edit: Before I was able to install my kivy, my pip doesn't work either. I tried countless ways on the Internet for the solution, but I just uninstalled and reinstalled back python to get it to work.
I found the answer!!
I copied this into the command prompt
bitsadmin /transfer "GetBatch" "https://git.io/vDDjn" "%cd%\python\kivy.bat"
cd python
and then searched kivy in C:. After that, I copied my pyhton file and put it into the kivy folder. Run it, and it worked!!