tmadl / semisup-learn

Semi-supervised learning frameworks for python, which allow fitting scikit-learn classifiers to partially labeled data
MIT License
501 stars 153 forks source link

Problems importing CPLELearningModel #6

Open mamonu opened 7 years ago

mamonu commented 7 years ago

when doing

from frameworks.CPLELearning import CPLELearningModel

I get

File "/home/MYUSERNAME/anaconda3/lib/python3.6/site-packages/semisup_learn-0.0.1-py3.6.egg/frameworks/CPLELearning.py", line 119 except Exception, e: ^ SyntaxError: invalid syntax

I am using python 3.6 and have installed the module by

python setup.py install

inoue0426 commented 7 years ago

I caught on the same problem. Maybe, this library only supports Python 2 series ...

wgmg165 commented 7 years ago

you can solve it by replace the line 119 'except Exception, e:' by 'except Exception as e:' . I have got the same problem when I used it in windows platform.

mamonu commented 7 years ago

I will. Thanks. I just wish the person that wrote the code corrects that as well so people can enjoy his hard work! Anyway i will try to correct all python 2-isms and report back