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 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 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\ and you should be able to run as follows:


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.

  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: shows another method using symbolic links.

See also:

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: