Sublime Forum

No module named sublime

#1

Hi! Install ST2 on mac os 10.7.1
All working fine, but when i tryed import sublime module i have a error:

import sublime ->> “ctrl+b”

Traceback (most recent call last):
File “/Volumes/Kobzar/zerg.py”, line 1, in
import sublime
ImportError: No module named sublime
[Finished]

In REPL console

Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import sublime
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named sublime

0 Likes

#2

sublime is a module only available in ST2 embedded Python interpreter.
import sublime only work from a plugin or inside the console, not on your system Python interpreter (and therefore not when running build command).

0 Likes

Workflow for ST3 plugin development