skip to Main Content

I am trying to learn kivy on vscode but when I create the .kv file and write the code in it, there is no run button to run the code, if I switch back to my python file the button returns but then leaves again when I switch to .kv file, is there a way I can activate a run button for the .kv file?

I was following a YouTube tutorial and I did exactly as the youtuber did the only difference is that he was using pycharm and I was using vscode.

2

Answers


  1. Here are a few things you can do to activate a run button for your .kv file in VS Code.

    1. Save your .kv file.
    2. Make sure that your .kv file is in the same directory as your .py
      file.
    3. Install the Kivy extension for VS Code. You can do this by opening
      the Extensions tab in VS Code and searching for "Kivy".
    4. In the Kivy extension settings, make sure that the "Run Kivy .kv
      Files" option is enabled. You can do this by opening the Kivy
      extension settings and checking the box next to "Run Kivy .kv
      Files".
    5. Click the run button in the toolbar for your .kv file.

    If you are still having trouble, you can ask for help in the Kivy community.

    Login or Signup to reply.
  2. You need to install the kivy extension to obtain support for kivy.

    However, you cannot execute a .kv file. Have a look at the kivy Getting Started.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search