How to change the default Python interpreter in Sublime text 3

后端 未结 1 719
小蘑菇
小蘑菇 2020-12-11 00:48

I am currently using the Anaconda python distribution for my project (NOT the anaconda plugin, they have the same name, but the one I am using includes Numpy, IPython, etc.

相关标签:
1条回答
  • 2020-12-11 01:20

    You can get it working by distinguishing the name of python.

    For example change

    C:\Python27\python.exe 
    

    to

    C:\Python27\python2.exe
    

    Change your environment variables to reference this change. Type python2 in cmd to confirm its working.

    And then you should be able to reference this from your build hotkey.

    {
    "path": "/home/username/anaconda/bin",
    "cmd": ["python2", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
    }
    
    0 讨论(0)
提交回复
热议问题