ADL: Porting ADT scripts to Linux Binaries

Jack Shultz jackygrahamez at
Mon Oct 8 08:43:40 PDT 2007

Hello AutoDockers!

I got some advice on this issue, but still don't understand how to import
MolKit module into python. I've tried it several ways first with pyinstaller
then with cx Freeze
1) Pyinstaller I tried it first with python and using path=directory of
MolKit, then I tried it using pythonsh because I figured that would do all
the necessary imports. It generated the error bellow.
2) Then I tried Sargis suggestion on cx freeze, but I ended up with the
familare message about "ImportError: No module named MolKit"

Any suggestions appreciated!


setting PYTHONHOME environment
I: computing EXE_dependencies
I: Finding TCL/TK...
I: found TCL/TK version 8.4
I: testing for Zlib...
I: ... Zlib available
I: Testing for Unicode support...
I: ... Unicode available
I: testing for UPX...
sh: upx: command not found
I: ...UPX unavailable
I: computing PYZ dependencies...
[root at vps pyinstaller-1.3]# pythonsh --onefile
setting PYTHONHOME environment
wrote /root/pyinstaller-1.3/prepare_ligand4/prepare_ligand4.spec
now run to build the executable
[root at vps pyinstaller-1.3]# pythonsh /root/pyinstaller-1.3
setting PYTHONHOME environment
checking Analysis
building because support/ changed
running Analysis out0.toc
Analyzing: support/
Analyzing: support/
Analyzing: /usr/local/MGLTools-1.4.6
Syntax error in /usr/local/MGLTools-1.4.6
('invalid syntax',
22, 1, '\r\n'))
Traceback (most recent call last):
  File "", line 839, in ?
  File "", line 76, in build
    exec open(spec, 'r').read()+'\n'
  File "<string>", line 2, in ?
  File "", line 112, in __init__
  File "", line 94, in __postinit__
  File "", line 182, in assemble
  File "/root/pyinstaller-1.3/", line 379, in analyze_script
    return self.analyze_r('__main__')
  File "/root/pyinstaller-1.3/", line 299, in analyze_r
    newnms = self.analyze_one(name, nm, imptyp)
  File "/root/pyinstaller-1.3/", line 333, in analyze_one
    mod = self.doimport(nm, ctx, fqname)
  File "/root/pyinstaller-1.3/", line 392, in doimport
    mod = parent.doimport(nm)
  File "/root/pyinstaller-1.3/", line 515, in doimport
    mod = self.subimporter.getmod(nm)
  File "/root/pyinstaller-1.3/", line 216, in getmod
    mod = owner.getmod(nm)
  File "/root/pyinstaller-1.3/", line 71, in getmod
    co = compile(open(py[0], 'r').read()+'\n', py[0], 'exec')
  File "/usr/local/MGLTools-1.4.6/mgltools_i86Linux2_1.4.6/MGLToolsPckgs/DejaVu/",
line 22

SyntaxError: invalid syntax

More information about the autodock mailing list