Problems installing weewx-purple extension

136 views
Skip to first unread message

weatherl...@gmail.com

unread,
Aug 25, 2020, 3:13:25 PM8/25/20
to weewx-user
Weewx-purple requires  weewx 4.1.1 (which is installed) and Paython > 3.7

pi@NUC62:/home/weewx $ python -V
Python 3.7.9

Running the installer gets me this:

sudo bin/wee_extension --install /home/pi/Downloads/weewx-purple-master.zip
Request to install '/home/pi/Downloads/weewx-purple-master.zip'
Extracting from zip archive /home/pi/Downloads/weewx-purple-master.zip
weewx-purple requires Python 3.7 or later, found 3.5

Is this a bug that weewx-purple is not seeing the python version or something I am doing wrong?

Intel NUC
Raspian Desktop

John Kline

unread,
Aug 25, 2020, 3:18:31 PM8/25/20
to weewx...@googlegroups.com
My guess is that you are running WeeWX with Python version 3.5.

Please send these logs from the log when you start WeeWX:

Aug 25 12:04:08 judygirldog weewx[21800] INFO __main__: Initializing weewx version 4.1.1                                                                                  
Aug 25 12:04:08 judygirldog weewx[21800] INFO __main__: Using Python 3.7.3 (default, Jul 25 2020, 13:03:44) #012[GCC 8.3.0]                                               
Aug 25 12:04:08 judygirldog weewx[21800] INFO __main__: Platform Linux-5.4.51-v7l+-armv7l-with-debian-10.4                 

On Aug 25, 2020, at 12:13 PM, weatherl...@gmail.com <weatherl...@gmail.com> wrote:

Weewx-purple requires  weewx 4.1.1 (which is installed) and Paython > 3.7
--
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/a0437e20-45c5-47dc-a0aa-551d47c9b961n%40googlegroups.com.

John Kline

unread,
Aug 25, 2020, 3:20:20 PM8/25/20
to weewx...@googlegroups.com
I see, it’s during the install.  What’s the first line of your wee_extension file?


On Aug 25, 2020, at 12:13 PM, weatherl...@gmail.com <weatherl...@gmail.com> wrote:

Weewx-purple requires  weewx 4.1.1 (which is installed) and Paython > 3.7
--

John Kline

unread,
Aug 25, 2020, 3:22:51 PM8/25/20
to weewx...@googlegroups.com
In particular, if the first line is:
#!/usr/bin/python3

send me the result of:
/usr/bin/python3 -V

On Aug 25, 2020, at 12:13 PM, weatherl...@gmail.com <weatherl...@gmail.com> wrote:

Weewx-purple requires  weewx 4.1.1 (which is installed) and Paython > 3.7
--

weatherl...@gmail.com

unread,
Aug 25, 2020, 8:59:37 PM8/25/20
to weewx-user
/usr/bin/python3 -V
python 3.5 3

I am officially confused in that case.

:-))

John Kline

unread,
Aug 25, 2020, 9:40:14 PM8/25/20
to weewx...@googlegroups.com
Well, we know the error message is not erroneous.

I assume it’s Debian (since it’ a NUC), and not Raspbian.

Is it buster?

/usr/bin/python3 is probably a symlink to /usr/bin/python3.5.  You could change it to 3.7, but this *might* have consequences for other software.

You could also change the first lines of the weewx executables: wee_extension, wee_database, weewxd to point to /usr/bin/python (since that appears to be pointing to 3.7), but that would be a maintenance headache.

It might be better to figure out how you got into this situation.  Perhaps you could uninstall 3.5 (it’s end of life is in 19 days).  Then, if need be, point /usr/bin/python3 to the 3.7 executable.

I wouldn’t do any of this if you don’t feel comfortable being able to dig out of any problems that might be created.  I am reasonably confident that you’d be fine without 3.5, but I’m not going to be able to spend time with you on this.

Perhaps others will have suggestions.  What version of the OS would be helpful along with telling us if you are up to date.

On Aug 25, 2020, at 5:59 PM, weatherl...@gmail.com <weatherl...@gmail.com> wrote:



Tom Keffer

unread,
Aug 25, 2020, 10:14:07 PM8/25/20
to weewx-user
I'm wondering who is issuing the "requires Python 3.7 or later" error. It's not wee_extension, nor anything else in WeeWX. Nor do I see any text like that in the PA extension.

I'm wondering if it is the zip library that is doing it...?

Wild chance, but try unzipping the archive using the zip utility, then running wee_extension on the resultant directory.

sudo bin/wee_extension --install /home/pi/Downloads/weewx-purple-master

where, I'm assuming, the unzipped extension will be in directory /home/pi/Downloads/weewx-purple-master.

-tk



John Kline

unread,
Aug 25, 2020, 11:08:50 PM8/25/20
to weewx...@googlegroups.com
That would be me.

It’s the weewx-purple extension, not weewx-purpleair.  It stores the pmX.X values in the 4.x extended database (i.e., doesn’t store to a separate database) and uses xtypes for PM2.5 AQI.  Besides listing in bold in the README that it needs WeeWX 4.x, Py3.7 and the extended database, it also checks both in the install and in the extension.

Of course, his issue is that he thought he was running WeeWX with Py3.7, but was not.

On Aug 25, 2020, at 7:14 PM, Tom Keffer <tke...@gmail.com> wrote:



Tom Keffer

unread,
Aug 26, 2020, 9:01:34 AM8/26/20
to weewx-user
Ah! Thanks for the clarification! 

You're giving up some potential users by targeting Python 3.7. In particular, all the Debian 9 users.

-tk

weather list

unread,
Aug 26, 2020, 9:46:34 PM8/26/20
to weewx...@googlegroups.com
Sorry to be back late to my thread.

It’s Raspian Desktop (recent) and fully updated.

When I start WeeWx manually, this is the log at startup:

pi@NUC62:/home/weewx $ sudo tail -f /var/log/syslog | grep weewx
Aug 26 21:19:48 NUC62 weewx[21100] INFO __main__: Initializing weewx version 4.1.1
Aug 26 21:19:48 NUC62 weewx[21100] INFO __main__: Using Python 3.5.3 (default, Jul  9 2020, 13:00:10) #012[GCC 6.3.0 20170516]
Aug 26 21:19:48 NUC62 weewx[21100] INFO __main__: Platform Linux-4.9.0-13-amd64-x86_64-with-debian-9.13
Aug 26 21:19:48 NUC62 weewx[21100] INFO __main__: Locale is 'en_US.UTF-8'
Aug 26 21:19:48 NUC62 weewx[21100] INFO __main__: Using configuration file weewx.conf
Aug 26 21:19:48 NUC62 weewx[21100] INFO __main__: Debug is 1

pi@NUC62:/home/weewx $ python -V
Python 3.7.9

I know this isn’t the place for Python questions but I’m at my limits here; how do I change the default python?

Tom Keffer

unread,
Aug 26, 2020, 10:05:59 PM8/26/20
to weewx-user
You're making it tough to debug because you're giving so little information and giving us very short log excerpts. 

1. What install method did you use? It looks like the setup.py method, but let's be sure. 

2. Are you running weewxd from the command line? Or, as a daemon?

3. What is the first line of /home/weewx/bin/weewxd?

4. If it exists, what are the contents of /etc/default/weewx?

-tk


weather list

unread,
Aug 26, 2020, 11:34:18 PM8/26/20
to weewx...@googlegroups.com
On 26 Aug, 2020, at 22:05, Tom Keffer <tke...@gmail.com> wrote:

You're making it tough to debug because you're giving so little information and giving us very short log excerpts.

Will remedy that; meanwhile, answers below.

1. What install method did you use? It looks like the setup.py method, but let's be sure. 

Setup.py

2. Are you running weewxd from the command line? Or, as a daemon?

Daemon, but using command line for occasional debugging with daemon stopped.

3. What is the first line of /home/weewx/bin/weewxd?

#!/usr/bin/python3

4. If it exists, what are the contents of /etc/default/weewx?

Doesn’t exist.

pi@NUC62:/home/weewx $ cd /etc/default
pi@NUC62:/etc/default $ ls
amd64-microcode  apache-htcacheclean  bluetooth     console-setup  cron  exim4  grub           hwclock          irqbalance  locale  networking  nss  rng-tools  rsyslog  timidity      useradd
anacron          avahi-daemon         bsdmainutils  crda           dbus  gpsd   grub.ucf-dist  intel-microcode  keyboard    mysql   nfs-common  ntp  rsync      ssh      triggerhappy


Tom Keffer

unread,
Aug 27, 2020, 6:53:51 AM8/27/20
to weewx-user
Well, if running

/usr/bin/python3 -V

gives you Python 3.5, while

python -V

gives you Python 3.7, the problem must be either a path issue, or a symbolic link issue.

1. Make sure it isn't a path issue. What does

which python

give you? Should be /usr/bin/python. 

2. Assuming that's the case, what does

ls -l /usr/bin/python*

give you?

3. One of the entries should be something like /usr/bin/python3.7. Assuming that's the case, changing the first line of /home/weewx/bin/weewxd so it reads

#!/usr/bin/python3.7

should fix the problem.

-tk


Reply all
Reply to author
Forward
0 new messages