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

Mats Wichmann mats at wichmann.us
Wed Aug 24 18:23:02 EDT 2022


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.




More information about the Python-list mailing list