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

后端 未结 2 1730
闹比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
    
    0 讨论(0)
  • 2021-01-02 07:10

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

    0 讨论(0)
提交回复
热议问题