Personal tools
Document Actions

ImportError: No module named Foo

Up to table of contents

This FAQ applies to: 1.5.2

I tried to use the prepare_ligand.py script, but got ImportError: No module named MolKit

This ImportError means that Python interpreter can't find appropriate packages from MGLTools. Please run these scripts using pythonsh (e.g. pythonsh prepare_ligand.py) located in:

platform_linux.gif Linux $MGL_ROOT/bin, where $MGL_ROOT is either /usr/local/MGLTools-1.5.2 or $HOME/MGLTools-1.5.2

.gif Mac OS X /Library/MGLTools/1.5.2/bin

windows_big_icon.gif Windows users: our installer creates/modifies C:\Python25\Lib\sitecustomize.py and you should be able to run prepare_ligand.py as follows:

C:\Python25\python.exe prepare_ligand.py

Python Path

pythonsh is a shell script that sets appropriate environment variables, such as PYTHONPATH, before starting python. If you are planning to use MGLTools for virtual screening only, i.e. no GUI mode, then you need to build or compile MGLTools, since only platform independent code is used for VS tutorial. You do need, however, numpy installed on your system. Here are steps needed to make sure that you can import all MGLTools packages.

  1. Download any of the binary tarballs, e.g.
  2. http://mgltools.scripps.edu/downloads/tars/releases/REL1.5.2/mgltools_i86Linux2_1.5.2.tar.gz

  3. Unpack MGLToolsPckgs

    tar -xzvf mgltools_i86Linux2_1.5.2.tar.gz
    cd mgltools_i86Linux2_1.5.2
    tar -xzvf MGLToolsPckgs.tar.gz
  4. Set PYTHONPATH environment variable.
    setenv PYTHONPATH `pwd`/MGLToolsPckgs
    How to set up PYTHONPATH on Windows?

Update: http://eflorenzano.com/blog/post/first-two-django-screencasts shows another method using symbolic links.

See also: http://autodock.scripps.edu/faqs-help/how-to/how-to-setup-adt-scripts

by Sargis Dallakyan last modified 2008-10-30 13:12 Molecular Graphics Laboratory, TSRI

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: