You're looking for custom build systems.
From the menu bar, click
Tools -> Build Systems -> New Build
Fill out the template it gives and save it under any filename ending in
.sublime-build to your
Here is the documentation for making custom build systems:
I recommend making a custom build system for python scripts, then add
variants for each virtual env you want. (see variants http://docs.sublimetext.info/en/latest/reference/build_systems.html#variants)
One you make a build system, you can switch them from
Tools -> Build Systems
(if not auto detected) and use the Command Palette (default ctrl + shift
p) to switch between variants.
The only "gotcha" is the
"cmd" parameter to describe what
command to run. By default it takes an array of strings to run as a
command, but you can use
"shell_cmd" instead to just use a
string of how you would run it via command line.