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)
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/__init__.py", line 5, in <module>
from PyML.classifiers import *
File "/usr/local/lib/python2.6/dist-packages/PyML/classifiers/__init__.py", line 2, in <module>
SVM = __import__('PyML.classifiers.svm', fromlist=).SVM
File "/usr/local/lib/python2.6/dist-packages/PyML/classifiers/svm.py", 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?
There is a bug in PyML/classifiers/svm.py
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.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.