KivyMD Hot Reload
May anybody explain every single thing to do a (hot reload) method in KivyMD? I have been watching a lot of videos, but nothing working for me. There’s no specific error to solve it.
Advertisement
Answer
I had trouble getting it started too at first… I figured it out by watching kivymd’s youtube videos at .25 speed lol…
This works for me on my Mac
Create a new pycharm project, set up a virtual environment, but don’t install any packages yet
Open the terminal within pycharm (make sure it says venv) and paste this command: (you can copy the whole thing and paste it in to run it all at once)
git clone https://github.com/kivymd/KivyMD.git --depth 1 cd KivyMD pip install .
Still in the terminal, back out of the kivymd folder with
cd ..
Then get your current directory by running
pwd
and copy the output.Next thing you need to do is run this command in the terminal after you make a few changes:
kivymd.create_project MVC /Users/macbookair/Projects MyMVCProject python3.10 2.1.0 --use_hotreload yes
The line that says /Users/macbookair/Projects
needs to be replaced with the output of your pwd
terminal command. Be sure to not delete the at the end. You can also change the
MyMVCProject
to any name you want
It will take a second for everything to install, but then you should see your project name folder in the project files. We need one more package to do the hotreload
pip install watchdog
Now to open our app in hotreload… first go into our project with
cd mymvcproject
and we need to run it in debug mode so runDEBUG=1 python main.py
App should be run now in hot reload.
Hope that helps