[TxMt] Re: Problems with python bundle

Alex Ross tm-alex at rosiba.com
Wed Nov 19 11:09:26 UTC 2008


On Nov 19, 2008, at 11:51 AM, Andrea Crotti wrote:

> Traceback (most recent call last): File "", line 7, in File
> "/Users/andrea/Library/Application Support/TextMate/Pristine
> Copy/Bundles/Python.tmbundle/Support/DocMate/docmate.py", line 7, in  
> import
> urllib2 File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
> python2.5/urllib2.py",
> line 91, in import hashlib File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
> python2.5/hashlib.py",
> line 133, in md5 = __get_builtin_constructor('md5') File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
> python2.5/hashlib.py",
> line 60, in __get_builtin_constructor import _md5 ImportError: No  
> module
> named _md5

The python dist you got from macports is *broken*.  You need to adjust  
your PATH so textmate finds your system python *first*.  I have a  
feeling that the symlinks in /usr/bin/ all point to your macports  
python.  Then you can use TM_PYTHON to get the correct python for your  
scripts run via CMD+R.

I have the following symlinks in /usr/bin/

lrwxr-xr-x  1 root  wheel  72 Mar 24  2008 /usr/bin/python -> ../../ 
System/Library/Frameworks/Python.framework/Versions/2.5/bin/python
lrwxr-xr-x  1 root  wheel  79 Mar 24  2008 /usr/bin/python-config - 
 > ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/ 
python-config
lrwxr-xr-x  1 root  wheel  75 Mar 24  2008 /usr/bin/python2.5 -> ../../ 
System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
lrwxr-xr-x  1 root  wheel  82 Mar 24  2008 /usr/bin/python2.5-config - 
 > ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/ 
python2.5-config
lrwxr-xr-x  1 root  wheel  73 Mar 24  2008 /usr/bin/pythonw -> ../../ 
System/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw
lrwxr-xr-x  1 root  wheel  76 Mar 24  2008 /usr/bin/pythonw2.5 - 
 > ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/ 
pythonw2.5

—alex


More information about the textmate mailing list