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

后端 未结 2 1756
闹比i
闹比i 2021-01-02 06:18

I\'m using numpy and mlrose, and all i have written so far is:

import numpy as np
import mlrose

However, when i run it, it comes up with an

2条回答
  •  感动是毒
    2021-01-02 06:59

    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
    

提交回复
热议问题