Python 3.4 on Sublime Text 3

后端 未结 3 1529
悲哀的现实
悲哀的现实 2020-12-02 16:06

I followed these steps to run Python 3 on Sublime Text 3.

Select the menu Tools > Build > New Build System and I entered the following:

{
\"cmd\": [\         


        
3条回答
  •  时光取名叫无心
    2020-12-02 16:14

    Thanks for your question. I began to learn python a couple days ago, and I am stuck with the same problem that you have met.Just as Andrew said above,it is “path problem”. I would like to share the code that I used to get python3 on sublime3. For MacOS user:

    {
    "cmd": ["/usr/local/bin/python3", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python",
    "encoding": "utf8",
    "path": "/usr/local/Frameworks/Python.framework/Versions/3.3/bin/"
    }
    

    and save the file as Python3.sublime-build. I deeply recommended the book "A byte of python " for the new beginner of python.This book contributes a lot to my answer for this question.

提交回复
热议问题