I am trying to set up a very simply python 2 build system in sublime text 3.
The default build environment for python works, but I want to be able to import top level modules of the project by adding the project folder to PYTHONPATH.
Here is my attempt at a build system:
{
"cmd": ["python", "-u", "$file"],
"env":
{
"PYTHONPATH": "$project_path"
},
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
The terminal pops up with:
Traceback (most recent call last):
File "C:\project", line 4, in <module>
from lib.util.utilities import pairwise
ImportError: No module named lib.util.utilities
[Finished in 0.3s]
It's not seeing the $project_path folder, otherwise it would be able to import utilities, as lib/ is a folder in the top level project folder. How can I fix this?
I am on x64 Windows 8.1
__init__.pyfile?__init__.py.Tools->Build System->my_python2_build.