Note that there are some explanatory texts on larger screens.

plurals
  1. POmanaging python import dependencies in SublimeText2 plugin. specifically unicodedata lib
    primarykey
    data
    text
    <p>I'm trying to fix a little <a href="https://github.com/alonisser/Sublime-Text-2-BIDI" rel="noreferrer">SublimeText2 plugin</a>. the problem seems to be (from SublimeText python console) to be an import error:</p> <pre><code>Traceback (most recent call last): File ".\sublime_plugin.py", line 62, in reload_plugin File ".\rtl.py", line 4, in &lt;module&gt; from algorithm import get_display File "lang\algorithm.py", line 20, in &lt;module&gt; from unicodedata import bidirectional, mirrored ImportError: No module named unicodedata </code></pre> <p>since unicodedata is the standard python library, I tried to import it directly in the console and got the same import error. I figured this is because sublimetext isn't using the system installed python version (I'm using python2.7 in a windows machine) but It's own bundled 2.6 python which doesn't bundle the whole standard library.</p> <p>when I try the import from my usual python interpreter everything works fine.</p> <p>I tried adding a .pth file that points to "c:\python27\lib" and site-packages etc. which didn't help. adding directly to the path like this:</p> <pre><code>sys.path.append(c:\\Python27\\lib) </code></pre> <p>didn't help either. also tried to tweaked my user setting file to include:</p> <pre><code>{ "PATH": "C:\\Python27;c:\\Python27\\Scripts", "PYTHONPATH": "C:\\Python27\\Lib;C:\\Python27\\Lib\\site-packages;C:\\Python27\\DLLs" } </code></pre> <p>my question divides into two:</p> <ol> <li>how to solve this problem specifically on my dev computer</li> <li>what is the right way to solve this universally for people trying to install the plugin. making the plugin dynamically aware of the default python installation and adding it to the path.</li> </ol> <p>Also, the strangest thing: The main SublimeText folder in program files actually has the unicodedata.pyd file in it. so I can't figure what the problem is! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload