larsmans / seqlearn

Sequence learning toolkit for Python

Home Page:http://larsmans.github.io/seqlearn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

seqlearn not working since new version of sklearn

peterdekker opened this issue · comments

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)

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