Set up Python 3 build system with Sublime Text 3

后端 未结 8 2143
青春惊慌失措
青春惊慌失措 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:38

    Run Python Files in Sublime Text3

    For Sublime Text 3, First Install Package Control:

    • Press Ctrl + Shift + P, a search bar will open
    • Type Install package and then press enter Click here to see Install Package Search Pic

    • After the package got installed. It may prompt to restart SublimeText

    • After completing the above step
    • Just again repeat the 1st and 2nd step, it will open the repositories this time
    • Search for Python 3 and Hit enter.
    • There you go.
    • Just press Ctrl + B in your python file and you'll get the output. Click here to see Python 3 repo pic

    It perfectly worked for me. Hopefully, it helped you too. For any left requirements, visit https://packagecontrol.io/installation#st3 here.

    0 讨论(0)
  • 2020-11-28 22:38

    And to add on to the already solved problem, I had installed Portable Scientific Python on my flash drive E: which on another computer changed to D:, I would get the error "The system cannot find the file specified". So I used parent directory to define the path, like this:

    From this:

    {
        "cmd": ["E:/WPy64-3720/python-3.7.2.amd64/python.exe", "$file"],
        "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
        "selector": "source.python"
    }
    

    To this:

    {
        "cmd": ["../../../../WPy64-3720/python-3.7.2.amd64/python.exe","$file"],
        "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
        "selector": "source.python"
    }
    

    You can modify depending on where your python is installed your python.

    0 讨论(0)
提交回复
热议问题