want to upgrade to 5.0, don't know original install method

159 views
Skip to first unread message

Mark Hahn

unread,
Jun 24, 2024, 2:05:06 PM (10 days ago) Jun 24
to weewx-user
I installed weewx long ago (10 yrs?).  It is version   4.10.2.  I don't have any idea how I installed it.  The is nothing related to weewx in my /root directory.  The is no weewx directory in /home.

Any ideas on how I should upgrade to 5.0?  Also, are there breaking changes from  4.10.2 to 5.0?

Mark Hahn

unread,
Jun 24, 2024, 2:10:20 PM (10 days ago) Jun 24
to weewx-user
I should say that I want to upgrade to get commands like "weectl device --dump".  Are there equivalent commands in  4.10.2?    I need those commands to follow instructions in " Troubleshooting the Davis Vantage station" page of wiki.  My other post here about my davis troubles is at https://groups.google.com/g/weewx-user/c/DMByZT6hyFM.

vince

unread,
Jun 24, 2024, 2:47:49 PM (10 days ago) Jun 24
to weewx-user
Mark you're asking a lot of very basic questions that seem to indicate that you haven't read any of the many recent additions to the documentation. 

The v5 docs are at https://www.weewx.com/docs/5.0/ and the v4 docs are at https://www.weewx.com/docs/4.10/

The upgrade guide at https://www.weewx.com/docs/5.0/upgrade/ with the differences and breaking changes etc.

Please RTFM.  That's why hundreds of hours were spent totally revamping the v5 docs and making them searchable.  They are really much better now.

(but to answer your latest question - if you have no /home/weewx tree you almost certainly used a dpkg/apt installation back then so https://www.weewx.com/docs/5.0/quickstarts/debian/ would be your quickstart documentation for upgrading.   Given you installed weewx a decade ago, I'm guessing (guessing) that you have an ancient os and python version on your pi.  It might be worth your while to see if you can use a new clean SD card, get current on the os, and go to a clean new installation of v5. )

michael.k...@gmx.at

unread,
Jun 24, 2024, 2:49:27 PM (10 days ago) Jun 24
to weewx-user

I'd recommend you to leave your old installation untouched, install weewx5 the pip way in a venv together with your extensions, a copy of your database and config and see if it works out. When the new installation works as desired, just switch.

Mark Hahn

unread,
Jun 24, 2024, 8:01:38 PM (9 days ago) Jun 24
to weewx-user
As suggested I did a separate install using pip.  It was very quick.   "weectl device --clear-memory" fixed my davis problem.

I decided to run the new 5.0. I copied over the conf file.  I didn't need to copy the db file.  Weewxd works great.

But now I want to run it as a daemon.  The pip install instructions said to use "sh ~/weewx-data/scripts/setup-daemon.sh".  I couldn't run this because weewx-data is in the .env folder, not in root.  I went to the weewx-data in .env and ran /setup-daemon.sh.  I had to change the location inside that script to also use weewx-data in .env.

The daemon install gave no errors but when I run "systemctl start weewx" I get this error ...

/etc/systemd/system/weewx.service:12: Executable "WEEWX_PYTHON" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 weewx.service: Unit configuration has fatal error, unit will not be started.

Can anyone tell me how to fix this?  Meanwhile I'll run in not as a daemon but obviously I've got to fix this.

vince

unread,
Jun 24, 2024, 8:04:16 PM (9 days ago) Jun 24
to weewx-user
You used pip.  Activate the venv first. Always.

Mark Hahn

unread,
Jun 24, 2024, 8:23:27 PM (9 days ago) Jun 24
to weewx-user
>  Activate the venv first
I followed the pip instructions carefully so I'm 99% sure I did "source ~/weewx-venv/bin/activate".

Mark Hahn

unread,
Jun 24, 2024, 8:26:07 PM (9 days ago) Jun 24
to weewx-user
I did ...
# Create the virtual environment python3 -m venv ~/weewx-venv # Activate the WeeWX virtual environment source ~/weewx-venv/bin/activate # Install WeeWX into the virtual environment python3 -m pip install weewx

vince

unread,
Jun 24, 2024, 9:14:39 PM (9 days ago) Jun 24
to weewx-user
Mark you're going to have to be much less concise please.   What are 'all' the commands you executed ?  What does the output look like end to end ?

What exactly are you doing ?
  • are you installing v5 pip on a clean no-weewx system ?
  • or are you upgrading a v4 setup to v5 pip ?
  • or are you upgrading a v4 dpkg to a v5 pip ?
You should not need to 'change the location inside that script' if you are following the instructions correctly.   You have to be doing something different or missing a step or several.  People have done hundreds (thousands?) of pip installations by now.

Lets take a step back and please tell us where you're starting, what you've done step-by-step, and what each step's output looked like.

Mark Hahn

unread,
Jun 24, 2024, 9:48:26 PM (9 days ago) Jun 24
to weewx-user
>  What are 'all' the commands you executed ? 
Are you serious?  I've been working on this for hours.

> You should not need to 'change the location inside that script' if you are following the instructions correctly.   
I followed the pip install to the letter.  See the commands I listed post before last.

> are you installing v5 pip on a clean no-weewx system ?
Read the thread.  I took michael.k's suggestion.

>  are you upgrading a v4 setup to v5 pip ?
Read the thread.  I said "I installed weewx long ago (10 yrs?).  It is version   4.10.2"

>  are you upgrading a v4 dpkg to a v5 pip ?
The subject of the thread is "want to upgrade to 5.0, don't know original install method"

> People have done hundreds (thousands?) of pip installations by now.
And none had any problems.
Message has been deleted

michael.k...@gmx.at

unread,
Jun 25, 2024, 1:20:14 AM (9 days ago) Jun 25
to weewx-user
"Activate the venv first. Always."

Means: "Activate the specifific venv everytime, you want to run a command for the specific installation in the venv, and the venv isn't active."

vince

unread,
Jun 25, 2024, 1:28:44 AM (9 days ago) Jun 25
to weewx-user
Mark - you're copping an attitude so I'm going to stop trying to help.  Go wild.

FWIW - if you run the command at my repo at https://github.com/vinceskahan/weewx-pipinstall it will do a start-to-finish installation of v5 pip weewx in simulator mode, with nginx, rsyslog, and logrotate installed and configured to work together as a whole.  One command to install a working setup.  Believe it or not.  Your call.

If you want to query your system to see what you did ages ago, try the command at my repo at https://github.com/vinceskahan/weewx-quickconfig which attempts to figure things out.

Or don't use them.   I'm done here.


Tom Keffer

unread,
Jun 25, 2024, 9:49:11 AM (9 days ago) Jun 25
to weewx...@googlegroups.com
Mark, 

I didn't understand your sentence, "The pip install instructions said to use "sh ~/weewx-data/scripts/setup-daemon.sh".  I couldn't run this because weewx-data is in the .env folder, not in root."

What is the ".env" folder? Is that where you put your virtual environment? This is normally called "weewx-venv", but calling it ".env" is OK. Just need to clarify what it is. 

Assuming it is your virtual environment then, yes, buried deep within, it contains a directory weewx_data. But note the underscore, instead of a hyphen: it's "weewx_data", not "weewx-data". This directory is used as the raw materials when creating a station. It is not intended to be used by the end user. Instead, commands such as "weectl create station" take its contents and massages them for your specific environment, then puts them in a final resting place. One of these contents is "setup-daemon.sh", which normally ends up in "~/weewx-data/scripts".

If you run "setup-daemon.sh" directly out of the virtual environment I would not be surprised that you get unpredictable results.

Anyway, to summarize, there are two key questions:

1. Is ".env" your virtual environment?
2. Did you run "weectl station create"? 

-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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/6416d428-0cc2-47f4-9b56-ee12f6e62a7en%40googlegroups.com.
Message has been deleted

Mark Hahn

unread,
Jun 25, 2024, 10:24:34 AM (9 days ago) Jun 25
to weewx-user
Mark Hahn
unread,
7:14 AM (1 minute ago) 
to weewx-user
I typed in weewx-venv  and weewx_data from memory.  Please excuse this and assume I meant the correct spelling.

> If you run "setup-daemon.sh" directly out of the virtual environment I would not be surprised that you get unpredictable results.

That is exactly what I did.  The instructions said to run "sh ~/weewx-data/scripts/setup-daemon.sh" and I had no weewx-data .

I looked over the instructions again and I now realize I did not create a station.  That would have given me the weewx_data folder. Your description of what creates the weewx_data folder clued me in.  Thanks for taking the trouble to explain things.

I will now remove the weewx-venv  folder and start over from scratch.  Wish me luck.


Mark Hahn

unread,
Jun 25, 2024, 10:28:00 AM (9 days ago) Jun 25
to weewx-user
>  Mark - you're copping an attitude
Yes I was and I apologize.    I got frustrated because alll your questions were answered earlier in the thread.   I do appreciate your effort to try to help me.

Mark Hahn

unread,
Jun 25, 2024, 11:25:32 AM (9 days ago) Jun 25
to weewx-user
Everything is working 100%.  Everyone has gone to a lot of trouble to help me and I thank you for that.  I'm sorry you had to do this all because I missed one command.  I'm also sorry for copping an attitude.  I have no excuse.
Reply all
Reply to author
Forward
0 new messages