Python import error: cannot import name 'six' from 'sklearn.externals' Python import error: cannot import name 'six' from 'sklearn.externals' numpy numpy

Python import error: cannot import name 'six' from 'sklearn.externals'


Solution: The real answer is that the dependency needs to be changed by the mlrose maintainers.

A workaround is:

import siximport syssys.modules['sklearn.externals.six'] = siximport mlrose


from sklearn.externals import six is deprecated, use import six instead