Virtualenv
Manage your virtualenvs directly from Sublime Text 3
Details
Installs
- Total 37K
- Win 15K
- Mac 11K
- Linux 10K
Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 9 | 2 | 2 | 0 | 2 | 1 | 4 | 2 | 0 | 1 | 4 | 1 | 2 | 1 | 1 | 3 | 3 | 1 | 1 | 0 | 1 | 1 | 1 | 5 | 0 | 2 | 0 | 0 | 0 | 4 | 1 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 1 | 1 | 1 | 4 | 3 | 9 |
Mac | 0 | 0 | 1 | 0 | 0 | 4 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 2 | 2 | 1 | 0 | 0 | 1 | 3 |
Linux | 0 | 0 | 0 | 1 | 7 | 0 | 0 | 1 | 0 | 0 | 0 | 3 | 1 | 1 | 0 | 1 | 4 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 0 | 1 | 1 |
Readme
- Source
- raw.githubusercontent.com
Sublime Text - Virtualenv
Manage your virtualenvs directly from Sublime Text 3.
Disclaimer: Not Maintained
I cannot maintain this project anymore since I stopped using Sublime Text. If you're interested on taking over reach out and we can discuss.
Features
- Reusable build system. Execute code with a virtualenv without editing your paths manually.
- Virtualenv search. Finds virtualenvs in the open folders or anywhere in your system.
- Activation/Deactivation. Select or disable the current virtualenv easily.
- Create and delete virtualenvs. With target python selection. Supports both the standard virtualenv package and the built-in venv module from Python 3.3.
- Integration with other packages. SublimeREPL.
Support
Only Sublime Text 3. Tested in Linux and Windows but it should work in OS X as well.
Installation
Install through Package Control as usual:
- Open command palette through the menu or with
Ctrl+Shift+P
. - Select
Package Control: Install Package
. - Search Virtualenv and press enter.
Detailed instructions here.
Usage
Code Execution
Enable the Python + Virtualenv
build system through the Tools -> Build System
menu and execute with Ctrl+B
. If you do not have any other custom Python builds defined, Automatic
should work too.
The build system works with or without an activated virtualenv, so it can be used as default build for Python.
Activate
Search Virtualenv: Activate
in the command palette and select the desired virtualenv.
Deactivate
The command Virtualenv: Deactivate
is available when a virtualenv is activated.
Creating a virtualenv
Choose Virtualenv: New
(or Virtualenv: New (venv)
for built-in virtualenv), type a destination
path and select a python binary. The new virtualenv will be activated automatically.
Deleting a virtualenv
Use the command Virtualenv: Remove
, choose a virtualenv and confirm.
Integrations
Launch a Python REPL using the current virtualenv with the command Virtualenv: SublimeREPL - Python
.
Settings
The list of default settings is available through Preferences -> Package Settings -> Virtualenv -> Default
. Do not modify the default settings as you will lose all the changes if the package is updated. You should override the necessary settings in Package Settings -> Virtualenv -> User
instead.
executable
The executable used for virtualenv creation. Defaults to python -m virtualenv
, assuming that virtualenv is installed on the default python prefix.
Depending on your setup you might want to change this to something like: virtualenv
, virtualenv-3.3
, python3 -m virtualenv
, etc.
virtualenv_directories
A list of directory paths searched for virtualenvs. By default, includes virtualenvwrapper's WORKON_HOME
. ~/.virtualenvs
in Linux and OS X, and ~\Envs
in Windows (virtualenvwrapper-win).
There is a shortcut command for quickly adding a virtualenv directory to your settings: Virtualenv: Add directory
.
extra_paths
Additional paths searched for python binaries. It might be useful in case of portable python installations. Defaults to none.
Advanced
The current virtualenv path is stored in the project settings and can be edited manually if the project has been saved to a *.sublime-project
file.
Extending or customizing the build system should be possible. Just set "target": "virtualenv_exec"
in your build system definition, or import and inherit from Virtualenv.commands.VirtualenvExecCommand
. More information on Sublime Text's build systems here.
Future plans
Just some ideas for possible improvements.
- Integration with more packages. Paths for SublimeCodeIntel?
- Brother package for
pip
commands.