ModuleNotFoundError: No module named 'six.moves'

2,131 views
Skip to first unread message

Ξ

unread,
Sep 2, 2024, 10:06:37 AM9/2/24
to weewx-user
Hello,

So after failing with WeeWX on Mint I'm trying to install it on Debian, but I get an error about missing module.

Unpacking weewx (4.10.2-1) ...
Setting up weewx (4.10.2-1) ...
Traceback (most recent call last):
  File "/usr/share/weewx/wee_config", line 12, in <module>
    from weecfg.config import ConfigEngine, Logger
  File "/usr/share/weewx/weecfg/__init__.py", line 21, in <module>
    from six.moves import StringIO, input
ModuleNotFoundError: No module named 'six.moves'
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

 
However, I believe 'six' is properly installed:
$ pip show six
Name: six
Version: 1.16.0
Summary: Python 2 and 3 compatibility utilities
Home-page: https://github.com/benjaminp/six
Author: Benjamin Peterson
Author-email: benjamin@@python.org
License: MIT
Location: /usr/lib/python3/dist-packages
Requires:
Required-by: 

Any help would be greatly appreciated!

Ivo

Tom Keffer

unread,
Sep 2, 2024, 10:41:27 AM9/2/24
to weewx...@googlegroups.com
Not sure why you're trying to install an old version of WeeWX. Why not the current version, V5.1.0?

There are many things that cause this error. You're not showing much about the error, so it's hard to diagnose. Are you trying to install WeeWX using apt-get? Or, dpkg? 

The Python used by the install process may not be the same one as used by your "pip show six" command. Or, it may not have access to /usr/lib/python3/dist-packages

What do you get with the command "python3 -V"?

How about "pip -V"?

How about "pip3 -V"?

How about "python3 -m site"?





W

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/4b7f2459-a22b-463b-8ee9-1a1618d45201n%40googlegroups.com.

Ξ

unread,
Sep 2, 2024, 11:14:19 AM9/2/24
to weewx-user
Hi Tom!

1. I'm trying to install an older version because anything 5+ requires python3-ephem of which the latest version for my distribution is 3.7.6.0-3 which in itself requires python3 under 3.6

2. I'm only showing the relevant error, otherwise the full process goes like this:
sudo apt-get install weewx=4.10.2-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  sqlite ftp
The following NEW packages will be installed:
  weewx
0 upgraded, 1 newly installed, 0 to remove and 223 not upgraded.
Need to get 0 B/1836 kB of archives.
After this operation, 6148 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package weewx.
(Reading database ... 124186 files and directories currently installed.)
Preparing to unpack .../weewx_4.10.2-1_all.deb ...

Unpacking weewx (4.10.2-1) ...
Setting up weewx (4.10.2-1) ...
Traceback (most recent call last):
  File "/usr/share/weewx/wee_config", line 12, in <module>
    from weecfg.config import ConfigEngine, Logger
  File "/usr/share/weewx/weecfg/__init__.py", line 21, in <module>
    from six.moves import StringIO, input
ModuleNotFoundError: No module named 'six.moves'
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

3. Output of the commands

zed@debian:~$ python3 -V
Python 3.12.5
zed@debian:~$ pip -V
pip 24.2 from /usr/lib/python3/dist-packages/pip (python 3.12)
zed@debian:~$ pip3 -V
pip 24.2 from /usr/lib/python3/dist-packages/pip (python 3.12)
zed@debian:~$ python3 -m site
sys.path = [
    '/home/zed',
    '/usr/lib/python312.zip',
    '/usr/lib/python3.12',
    '/usr/lib/python3.12/lib-dynload',
    '/usr/local/lib/python3.12/dist-packages',
    '/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/zed/.local' (exists)
USER_SITE: '/home/zed/.local/lib/python3.12/site-packages' (doesn't exist)
ENABLE_USER_SITE: True



Many thanks!

bell...@gmail.com

unread,
Sep 2, 2024, 11:29:40 AM9/2/24
to weewx-user

vince

unread,
Sep 2, 2024, 1:20:14 PM9/2/24
to weewx-user

Confused. You last posted an attempt to install on a recent debian so v5 should have worked fine. Why again aren’t you using v5?  What does you /etc/os-release say?  What distro and architecture are you on ?

Ξ

unread,
Sep 2, 2024, 2:59:30 PM9/2/24
to weewx-user
Hello Rich,

Apologies for not using the search, that was indeed very helpful and did the job. Much obliged!

Hi Vince,

– Why again aren’t you using v5? 
I'm actually running Debian Trixie ppc64 on and old old Power Mac :)
So whenever I try to install v5 it asks for Python3-ephem, however the latest
ppc64 package is python3-ephem_3.7.6 and it requires Python <3.6 whereas my version is 3.12.

Right now I'm successfully (for the most part) running v4.10 after removing six.py from the weewx directory.
The only problem is exactly the same as described here by Greg but it's OK, without the plots/reports data is being collected and sent online. Unlike Greg I haven't been able to downgrade pillow yet, and the link to genplot.py from that thread provided by Tom is now 404, but it's not a big issue.

Case closed I guess and thanks for all the help!



vince

unread,
Sep 2, 2024, 6:14:04 PM9/2/24
to weewx-user
A unreleased debian on a niche architecture on really ancient hardware ?  Wow good luck there.

https://packages.debian.org/trixie/ppc64el/python3-ephem/download seems to want latest python, unless your architecture isn't compatible with 'ppc64el' in which case you'd need to try a pip installation of the missing module and perhaps force a dpkg (not apt) installation of weewx and any corequisites to get current.

You're going to want to get current regardless eventually.  I still have to think a pip installation of weewx should work

Tom Keffer

unread,
Sep 2, 2024, 7:09:43 PM9/2/24
to weewx...@googlegroups.com
I agree. If ephem is giving you problems, install piecemeal using pip and leave ephem out.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Ξ

unread,
Sep 5, 2024, 7:04:52 AM9/5/24
to weewx-user
Hi Vince,
Afaik ppc64el is for IBM machines and not suited for the Macintosh ppc64 architecture so I won't attempt installing it.

Ξ

unread,
Sep 5, 2024, 7:09:25 AM9/5/24
to weewx-user
Hi Tom,

Thanks for the tip, I've tried it out but it fails to build wheel for Pillow, it looks like a really neat approach but I don't see the point of trying to troubleshoot why it fails.
But it'd be appreciated if you happen to have a copy of genplot.py fix from here as that link doesn't work anymore. If not it's not a big deal, like I said data is collected and sent online as it is now.

Regards,
Ivo



On Tuesday, September 3, 2024 at 2:09:43 AM UTC+3 Tom Keffer wrote:

Tom Keffer

unread,
Sep 5, 2024, 7:39:10 AM9/5/24
to weewx...@googlegroups.com
The commit leads to this version.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages