Using virtualenv with sublime text 2
python, sublimetext2, virtualenv
Solution
Note comments about this solution being incorrect.
You have to edit your sublime-project file and add the following:
"build_systems":
[
{
"name": "Run Tests",
"cmd": ["source", "/path/to/your/virtualenv/bin/activate"],
"working_dir": "/path/to/to/you/django_project",
"cmd": ["python", "manage.py", "test"]
}
]
Problem
I am using sublime text 2 for python development along with virtualenv! The standard sublime text 2 build system uses the standard python install rather than my virtualenv where my packages are installed. How can I get sublime text 2 to build using my virtualenv? I currently use the terminal to activate my environment and run my scripts. UPDATE: Never got it working, but seeing as i am using flask and it builds when you make a change, it's not a big issue