ImportError: No module named spambayes.resources (line 12 of setup_all.py)

Barry barry at barrys-emacs.org
Thu Aug 25 02:17:44 EDT 2022



> On 24 Aug 2022, at 23:25, Mats Wichmann <mats at wichmann.us> wrote:
> 
> On 8/24/22 13:54, Erik M. Brown via Python-list wrote:
>> Is anyone here familiar with SpamBayes?  I am working with legacy 2.4.x
>> Python code (I'm not a programmer, more of a power user) and I'm attempting
>> to build the windows binary from the SpamBayes source.  
>> 
>> 
>> 
>> I'm running into an error when attempting to run "setup_all.py", the py2exe
>> setup script, and I get the following:
>> 
>> 
>> 
>> "ImportError: No module named spambayes.resources (line 12 of setup_all.py)"
> 
> 
> Wow, that's a blast from the past... I wouldn't hold out too much hope,
> we're talking about something that's been on the inactive list for a
> decade and a half at least, if memory serves.  Python 2.4 itself dates
> to 2004. There does seem to be have been some effort to uplift Spambayes
> to Python 3:
> 
> https://github.com/mpwillson/spambayes3
> 
> but in generic terms: "no module named" is always a path problem.  The
> Python that is running and emits that error is looking in a place where
> the code it's trying to import... isn't.  If you got it to work in some
> scenario, you need to compare the version of Python involved in that
> effort, and its paths (sys.path value) vs. what's getting run when you
> try to execute the thing that's failing.

On fedora I still use spambayes and it works great, but I have it
running under python 2.7. never did take on a port to python 3
I will have to consider that when python 2 finally is removed from fedora,
or use something else.

Barry

> 
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 



More information about the Python-list mailing list