Problem running PyML - ImportError

  • Travis Stewart

    Travis Stewart - 2010-05-07

    I am using Ubuntu 9.10 and python 2.6.

    I downloaded and attempted to follow the instructions given in the tutorial.  After building and installing PyML (both completed though with a fairly large number of warnings) I attempted to test the installation.  I did this by going to the data directory, starting the interpreter and typing:
    from PyML import *

    as indicated.  However I receive this error:

    Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15)
    on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from PyML import *
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.6/dist-packages/PyML/", line 5, in <module>
        from PyML.classifiers import *
      File "/usr/local/lib/python2.6/dist-packages/PyML/classifiers/", line 2, in <module>
        SVM = __import__('PyML.classifiers.svm', fromlist=).SVM
      File "/usr/local/lib/python2.6/dist-packages/PyML/classifiers/", line 12, in <module>
        from PyML.evaluators import assess,results
    ImportError: cannot import name results

    I am not sure what I can do about this, if it is a problem on my end or not.

    Can anyone help with this?

  •  meanerelk

    meanerelk - 2010-06-07

    There is a bug in PyML/classifiers/

    The module 'resultsObjects' is incorrectly imported and referenced as 'results'.

    Just apply this simple patch, then rebuild and reinstall:

    < from PyML.evaluators import assess,results
    > from PyML.evaluators import assess,resultsObjects
    <     resultsObject = results.RegressionResults
    >     resultsObject = resultsObjects.RegressionResults


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks