sets icon indicating copy to clipboard operation
sets copied to clipboard

'module' object has no attribute 'Minist'

Open lfwin opened this issue 8 years ago • 2 comments

Hi, I install by sudo pip install sets, OS is ubuntu 14.04LTS, when running example code in your blog https://gist.github.com/danijar/8663d3bbfd586bffecf6a0094cd116f2, error as the title occurs.

lfwin avatar Jul 15 '16 07:07 lfwin

There's a naming conflict when you use Python 2.7 or earlier – a built-in (but deprecated) module named sets still exists in Python 2. So when you install this package from PyPI and do import sets, you're actually importing the deprecated built-in module instead, which is why it doesn't find sets.Mnist().

This issue isn't encountered in Python 3 because the deprecated module is gone. I'd recommend renaming this module in PyPI to be compatible with 2.7, considering how many people still use 2.7 (myself included).

JDRomano2 avatar Jul 19 '16 16:07 JDRomano2

Agree with @JDRomano2 .

lan2720 avatar Aug 30 '16 01:08 lan2720