崇高的文本 2 &路径 [英] Sublime Text 2 & PYTHONPATH

查看:33
本文介绍了崇高的文本 2 &路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Sublime Text 2 (OSX) 上运行 python 脚本时,python 解释器可以工作(使用 Enthought Python 分发版),但不能运行我自己的 PYTHONPATH.下面是 Python.sublime-build 文件现在的样子:

When running a python script on Sublime Text 2 (OSX), the python interpreter works (using Enthought Python Distribution) but not my own PYTHONPATH. Here's what the Python.sublime-build file looks like at the moment:

{
"path": "/Library/Frameworks/EPD64.framework/Versions/Current/bin/",
"cmd": ["python2.7", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}

如何将 PYTHONPATH 正确添加到此文件?我知道 Sublime Text 2 没有选择 PYTHONPATH,因为我的一些自定义包无法导入.任何帮助将不胜感激.

How can I add the PYTHONPATH to this file correctly? I know that the PYTHONPATH is not being picked up by Sublime Text 2, since some of my custom packages cannot be imported. Any help would be greatly appreciated.

干杯

推荐答案

上面的设置是正确的,但我的系统必须重新启动.一旦完成,一切正常.

The setup was correct from above, but my system has to be restarted. Once that was done everything was working.

这篇关于崇高的文本 2 &路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆