Sublime Forum

No Module Named Yaml

#1

Hi,

I’m trying to use the Yaml module in a plugin I’m writing, but I keep getting the error:
ImportError: No module named yaml

I’m on OS X. I have installed the Yaml module. When I go to the python command line, I can use the Yaml module just fine. But in the plugin, I get the error on the import yaml line.

Sorry, I’m really new to python.
Heres a few more details
“which python” => /Users/me/Developer/bin/python
Last line of yaml module install => Writing /Users/me/Developer/Cellar/python/2.7.2/lib/python2.7/site-packages/PyYAML-3.10-py2.7.egg-info

So it definitely looks like I’m not using the system-wide version of Python, which I’m assuming is used by Sublime Text(?).

So a few questions

  1. What version of python does Sublime Text use?
  2. Where is it installed
  3. Is there anyway I can install the Yaml module there?
0 Likes

#2

Sublime Text installs its own copy of Python. On my Windows computer it’s at:

C:\Program Files (x86)\Sublime Text 2\python26.zip

You could copy Yaml into your corresponding folder, but it will (possibly…) be found if you store it in your Packages folder (User or Python).

Alternatively, you may need to find a path setting :question:

0 Likes