Set up Python 3 build system with Sublime Text 3

后端 未结 8 2185
青春惊慌失措
青春惊慌失措 2020-11-28 21:46

I want to configure Sublime Text 3 to build Python 3, but I don\'t seem to understand how the builds work. Many tutorials have told me to make a build file containing code s

8条回答
  •  星月不相逢
    2020-11-28 22:18

    first you need to find your python.exe location, to find location run this python script:

    import sys
    print(sys.executable)
    

    Then you can create your custom python build:

    {
    "cmd": ["C:\\Users\\Sashi\\AppData\\Local\\Programs\\Python\\Python39\\python.exe", "-u", "$file"],
    "file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
    "selector": "source.python"}
    

    You can change the location, In my case it is C:\Users\Sashi\AppData\Local\Programs\Python\Python39\python.exe

    Then save your new build. Don't change the file extension while saving.

提交回复
热议问题