I am new to SublimeText2. So far I have found this excellent, but I just ran into a problem that I could not solve. I am trying to import a Python module, mechanize, in my script. However, whenever it starts (only the import mechanization line), I get:
Traceback (most recent call last): File "/Users/gabrielbianconi/Desktop/test.py", line 1, in <module> import mechanize ImportError: No module named mechanize [Finished in 0.3s with exit code 1]
However, when I run this line in the terminal, it works fine:
gb-air:~ gabrielbianconi$ python Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import mechanize >>>
I think this is a problem with ST2. I saw that ST2 on Mac uses system python, so I donβt understand why it does not recognize the module.
Many thanks.
Edit: I'm on OS X Mountain Lion.
source share