我不明白为什么Sublime Text 3的控制台无法到达任何PATH命令。python并coffee返回“未定义”错误。我尝试了很多不同的方法:
我已经Python.sublime-settings在Packages / Python中添加了,并且一直在尝试找到正确的路径
{
"env" :
{
"PYTHONPATH" : "/usr/local/bin/python:/usr/local/share/python:/usr/local/lib/python:/usr/local/Cellar/python/2.7.5/lib/python2.7/site-packages"
//"PYTHONPATH" : "/usr/local/git/bin:/usr/local/sbin:/usr/local/share/python:/Users/zak/.nvm/v0.10.0/bin:/opt/local/bin:/opt/local/sbin:/Users/zak/.rvm/gems/ruby-2.0.0-p0/bin:/Users/zak/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/zak/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/zak/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/opt/local/bin"
},
"path": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin/python:/usr/local/bin/python:/usr/local/share/python:/usr/local/lib/python",
// "cmd": ["/usr/local/bin/python", "-u", "$file"],
"cmd": ["python", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
我也尝试过将添加path.py到Packages/User:
导入操作系统
LOCAL = '/usr/local/git/bin:/usr/local/sbin:/usr/local/share/python:/Users/zak/.nvm/v0.10.0/bin:/opt/local/bin:/opt/local/sbin:/Users/zak/.rvm/gems/ruby-2.0.0-p0/bin:/Users/zak/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/zak/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/zak/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/opt/local/bin'
os.environ['PATH'] += ':'
os.environ['PATH'] += LOCAL
# print('PATH = ' + os.environ['PATH'])
什么都行不通。不但不能使用python,并coffee从控制台,但使用这些库,我的安装包失败也是如此。如何获得Sublime Text 3以使用正确的PATH和环境变量?
相关分类