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 six
import sys
sys.modules['sklearn.externals.six'] = six
import mlrose

Leave a Comment