How to set which version of python sublime text uses

后端 未结 2 1688
悲&欢浪女
悲&欢浪女 2020-12-13 14:54

I have been teaching myself python and started out using python 2.7.5 and Sublime Text 2. I recently enrolled in a class and they are using python 3.4. I downloaded and ins

2条回答
  •  醉梦人生
    2020-12-13 15:45

    Found this on Google.

    Create the file ~/.config/sublime-text-2/Packages/Python/Python3.sublime-build:

    {
        "cmd": ["python3", "-u", "$file"],
        "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
        "selector": "source.python"
    }
    

    You should then be able to choose the Python3 build system.

    If that doesn't work, try this:

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

提交回复
热议问题