Can't find PCA class in 3.5.0

267 views
Skip to first unread message

Dona Hertel

unread,
May 2, 2012, 5:09:37 AM5/2/12
to mlpy-g...@googlegroups.com
    I'm having problems with mlpy finding the PCA class.  My code is:

import mlpy


x = in_data.to_numpy()[0]

K = mlpy.KernelGaussian(10)

p = mlpy.PCA()



I get the error message:


Traceback (most recent call last):

File "<console>", line 1, in <module>

File "<string>", line 5, in <module>

AttributeError: 'module' object has no attribute 'PCA'



I also tried using mlpy.pca(), mlpy.Pca() to no avail. The kernel versions don't work either.


Dona Hertel




Alberto Anzellotti

unread,
Jul 2, 2012, 8:56:26 AM7/2/12
to mlpy-g...@googlegroups.com
I've got the same prob, pretty irritating.. did someone fix it?

mchierici

unread,
Jul 3, 2012, 4:04:27 AM7/3/12
to mlpy-g...@googlegroups.com
Dear Dona

could you please specify the operating system you are using?

For example, let's assume Linux OS and Python 2.7; in this case you could try removing the folder 'mlpy' and the file 'mlpy-3.5.0-py2.7.egg-info', which are found in

/usr/lib/python2.7/site-packages/

(the actual directory name may vary depending on the specific operating system)

Then, please reinstall mlpy.

Let us know if this was of help!

Thanks
Marco

Aldo Garcia

unread,
Aug 9, 2012, 12:51:53 AM8/9/12
to mlpy-g...@googlegroups.com
Hello,

I'm also having this bug in Mac Os X 10.7. I tried doing what you suggest but still getting the same error.

NameError: name 'pca' is not defined

I installed it by doing "python2.7 setup.py install" after removing both the mlpy directory and the egg file.

Hope this can be fixed.
Thanks,
Aldo.
Reply all
Reply to author
Forward
0 new messages