larsmans / seqlearn

Sequence learning toolkit for Python
http://larsmans.github.io/seqlearn/
MIT License
686 stars 103 forks source link

seqlearn not working since new version of sklearn #47

Open peterdekker opened 4 years ago

peterdekker commented 4 years ago

Since I use a new version of sklearn, six is no longer part of sklearn, but a separate library. Hence, seqlearn gives an error, when trying to run a perceptron:

/usr/local/lib/python3.8/dist-packages/seqlearn/perceptron.py in <module>
      8 import numpy as np
      9 from scipy.sparse import csc_matrix
---> 10 from sklearn.externals import six
     11 
     12 from .base import BaseSequenceClassifier

ImportError: cannot import name 'six' from 'sklearn.externals' (/usr/local/lib/python3.8/dist-packages/sklearn/externals/__init__.py)
peterdekker commented 3 years ago

For who is interested, this is a workaround: https://stackoverflow.com/a/62354885