no luck, no progress on getting weewx on CentOS 7.9

53 views
Skip to first unread message

Rich Painter

unread,
Nov 22, 2020, 9:11:15 PM11/22/20
to weewx...@googlegroups.com
CentOS 7.9 64bit clean install
Directions on http://weewx.com/docs/redhat.htm don't result in a workable weewx.
Note- those instructions do NOT have a step for wee_config --install
Starting weewx installation over from scratch....
Below is a complete transcript. One IMPORTANT thing to notice is the "installed drivers" output section seems to show there are a LOT of missing driver components!!!!
ALL of these steps are 100% repeatable. Variants using "wee_config --reconfigure" result in the SAME failures!
Anyone know who the creator of the rpm repo is??
Any help would be appreciated.
thanks
rich


Uninstall and try again:

----------------- yum remove weewx

----------------- rpm --import http://weewx.com/keys.html

----------------- curl -s http://weewx.com/yum/weewx-el7.repo | sudo tee /etc/yum.repos.d/weewx.repo
[weewx]
name=weewx
baseurl=http://weewx.com/yum/weewx/el7
enabled=1
gpgcheck=0

----------------- yum install weewx
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.den01.meanservers.net
 * epel: mirror.oss.ou.edu
 * extras: mirror.den01.meanservers.net
 * updates: mirror.vcu.edu
weewx                                                    | 3.0 kB     00:00
Resolving Dependencies
--> Running transaction check
---> Package weewx.noarch 0:4.2.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch             Version                 Repository       Size
================================================================================
Installing:
 weewx           noarch           4.2.0-1.el7             weewx           1.3 M

Transaction Summary
================================================================================
Install  1 Package

Total download size: 1.3 M
Installed size: 4.8 M
Is this ok [y/d/N]:
Downloading packages:
weewx-4.2.0-1.el7.noarch.rpm                               | 1.3 MB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : weewx-4.2.0-1.el7.noarch                                     1/1
Listing /usr/share/weewx ...
Listing /usr/share/weewx/schemas ...
Listing /usr/share/weewx/user ...
Listing /usr/share/weewx/weecfg ...
Listing /usr/share/weewx/weedb ...
Listing /usr/share/weewx/weeimport ...
Listing /usr/share/weewx/weeplot ...
Listing /usr/share/weewx/weeutil ...
Listing /usr/share/weewx/weewx ...
Listing /usr/share/weewx/weewx/drivers ...
Starting weewx (via systemctl):  [  OK  ]
  Verifying  : weewx-4.2.0-1.el7.noarch                                     1/1

Installed:
  weewx.noarch 0:4.2.0-1.el7

Complete!

# this next step is NOT in the instructions but elsewhere weewx is supposed to be stopped before doing the config....
# even so, leaving out this step does NOT change anything! The result of the wee_config is the same failure....
----------------- service weewx stop

# Next Configure:
----------------- cd /etc/weewx
----------------- wee_config --debug --verbosity=3 --install --output=weewx.conf --dist-config=weewx.conf.dist
Enter a brief description of the station, such as its location.  For example:
Santa's Workshop, North Pole
description [My Little Town, Oregon]: Fremont Comm Site, Salida CO

Specify altitude, with units 'foot' or 'meter'.  For example:
35, foot
12, meter
altitude [700, foot]: 11000, foot

Specify latitude in decimal degrees, negative for south.
latitude [0.00]: 38.446630
Specify longitude in decimal degrees, negative for west.
longitude [0.00]: -106.010750

You can register your station on weewx.com, where it will be included
in a map. You will need a unique URL to identify your station (such as a
website, or WeatherUnderground link).
Include station in the station registry (y/n)? [n]: n

Indicate the preferred units for display: ['us', 'metric']
units [us]:

Installed drivers include:
  0) ?               (weewx.drivers.acurite)   No module named usb
  1) ?               (weewx.drivers.cc3000)    No module named serial
  2) ?               (weewx.drivers.fousb)     No module named usb
  3) Simulator       (weewx.drivers.simulator)
  4) ?               (weewx.drivers.te923)     No module named usb
  5) ?               (weewx.drivers.ultimeter) No module named serial
  6) Vantage         (weewx.drivers.vantage)
  7) ?               (weewx.drivers.wmr100)    No module named usb
  8) ?               (weewx.drivers.wmr200)    No module named usb
  9) ?               (weewx.drivers.wmr300)    No module named usb
 10) ?               (weewx.drivers.wmr9x8)    No module named serial
 11) WS1             (weewx.drivers.ws1)
 12) WS23xx          (weewx.drivers.ws23xx)
 13) ?               (weewx.drivers.ws28xx)    No module named usb
choose a driver [3]: 5
Traceback (most recent call last):
  File "/usr/share/weewx/wee_config", line 123, in <module>
    main()
  File "/usr/share/weewx/wee_config", line 117, in main
    config_mgr.run(args, options)
  File "/usr/share/weewx/weecfg/config.py", line 114, in run
    stn_info = self.get_stn_info(config_dict, options)
  File "/usr/share/weewx/weecfg/config.py", line 155, in get_stn_info
    stn_info.update(weecfg.prompt_for_driver_settings(driver, config_dict))
  File "/usr/share/weewx/weecfg/__init__.py", line 1685, in prompt_for_driver_settings
    __import__(driver)
  File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 59, in <module>
    import serial
ImportError: No module named serial


--
Richard A. Painter, P.E. Retired


vince

unread,
Nov 22, 2020, 9:33:59 PM11/22/20
to weewx-user
On Sunday, November 22, 2020 at 1:11:15 PM UTC-8 paint...@gmail.com wrote:
CentOS 7.9 64bit clean install
Directions on http://weewx.com/docs/redhat.htm don't result in a workable weewx.
Note- those instructions do NOT have a step for wee_config --install
Starting weewx installation over from scratch....
Below is a complete transcript. One IMPORTANT thing to notice is the "installed drivers" output section seems to show there are a LOT of missing driver components!!!!
ALL of these steps are 100% repeatable. Variants using "wee_config --reconfigure" result in the SAME failures!
Anyone know who the creator of the rpm repo is??
Any help would be appreciated.


The rpm comes from the weewx team.

Your 'no module named usb' and 'no module named serial' and the seemingly missing things are because you didn't have all the prerequisite python modules (rpms) installed.  This is a longstanding known thing that has bitten many people over the years.  You have to install the prerequisites. 

Unfortunately CentOS is weird a.  I did a lot of testing of this in the v4 pre-release timeframe but did most of it using the setup.py (not rpm) method of installation.

 If you give me a couple hours I can probably do a quick test in a VM both ways to reverify vs. Centos-7.9
 

vince

unread,
Nov 22, 2020, 9:51:06 PM11/22/20
to weewx-user
ok - tested fine on a current vagrant centos image
 
The rpm is fine - you just probably used the RedHat 8 (python3) instructions by mistake rather than the RedHat 7 (python2) instructions...

   sudo rpm --import http://weewx.com/keys.html
   sudo curl -s http://weewx.com/yum/weewx-el7.repo | sudo tee /etc/yum.repos.d/weewx.repo
   sudo yum install weewx -y

If you have previously picked the wrong repo, you might need a 'sudo yum clean all' before (re)running the above.

Rich Painter

unread,
Nov 22, 2020, 9:51:46 PM11/22/20
to weewx...@googlegroups.com
thanks Vince!

But I'm really confused... IF there are prerequisites then A)  they should be bolted into the rpm process. that is what rpms are for and B) they should be part of the WRITTEN instructions at the OFFICIAL weewx http://weewx.com/docs/redhat.htm for rehat/centos distributions.

I take it from your response that this is clearly a well-known (to some) weewx problem so why has not the fixes been written into the weewx http://weewx.com/docs/redhat.htm ??

I'm pleased and excited that you have responded with hope. I'm brand new to weewx but have used Ubuntu and CentOS for a very long time. I'm a 40-year C developer but have never known python. I have not been able to get weewx to run on either U20 or C7 !

thanks!
rich




--
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/7f1b816d-8c81-4eb3-8f96-0939384711cdn%40googlegroups.com.

Rich Painter

unread,
Nov 22, 2020, 9:55:51 PM11/22/20
to weewx...@googlegroups.com
Vince,

Nope. I have only ever used the correct version 7 repo.... I posted the exact steps in my earlier request.... which you have restated here exactly to what I did....

Any other suggestions?

thanks
rich

--
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.

bell...@gmail.com

unread,
Nov 22, 2020, 9:56:25 PM11/22/20
to weewx-user

At the very top of that page I see this....
Install pre-requisites
For Redhat 8:
sudo yum install epel-release 
sudo yum install python3-cheetah
For Redhat 7:
sudo pip install pyserial pyusb

Rich Painter

unread,
Nov 22, 2020, 10:02:25 PM11/22/20
to weewx...@googlegroups.com
Before posting anything I had already tried this

For Redhat 7:
sudo pip install pyserial pyusb

but CentOS 7.9 has no program pip !! so I had tried this:
[root@CRMG-Fremont weewx]# yum install pip

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.den01.meanservers.net
 * epel: mirror.oss.ou.edu
 * extras: mirror.den01.meanservers.net
 * updates: mirror.dal10.us.leaseweb.net
No package pip available.
Error: Nothing to do

So I assumed this was not a step for CentOS.... Obviously wrong.

What would the corresponding CentOS 7 program be for pip?

thanks
rich

vince

unread,
Nov 22, 2020, 10:58:20 PM11/22/20
to weewx-user
What's going on is CentOS-7 is weird in general and especially for python-related things.

You need to get the pyserial and pyusb and  (optional) python2-pip rpms from the EPEL repository.
They are not bundled with CentOS-7 in the os's default repositories.  They're extras.
  • sudo yum install epel-release
  • sudo yum install -y pyserial pyusb
  • sudo yum install -y python2-pip
CentOS also names things oddly, and sometimes you need to figure it out via  'yum search whatever' 

If you install the pyserial and pyusb corequisites, then wee_config will look right.
Installing pip is optional.

Now as for why the weewx rpms don't do this, remember that not all RHEL-based operating systems are the same, and our friends at RedHat make fascinatingly odd decisions all the time that result in trauma for their users.  We can't always explain why it's different or why bundling of things change massively sometimes (example - the repo structure in RHEL-8 is a train wreck).

Sometimes you just gotta deal with craziness from upstream...

Rich Painter

unread,
Nov 23, 2020, 12:05:08 AM11/23/20
to weewx...@googlegroups.com
Vince,
roger that.
I had at the start enable the epel-release stuff as part of the CentOS 7.9 install. I have always included the epel in all centos installations.

The pip thing threw me since I never heard of it and it failed to install when I tried.

Just before you replied with this, I finally after being lead to this point tried:
yum install pyserial pyusb

and then the wee_config works!

For some reason I didnt need to do the python2-pip likely since centos doesnt have pip at all...

I have added these steps to my procedure! I hope others can be helped by this.

thanks
rich

--
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.

vince

unread,
Nov 23, 2020, 1:02:29 AM11/23/20
to weewx-user
On Sunday, November 22, 2020 at 4:05:08 PM UTC-8 paint...@gmail.com wrote:
For some reason I didnt need to do the python2-pip likely since centos doesnt have pip at all...


You didn't need to install pip because it's optional for weewx.  If you dig a bit deeper you'll see you only need it when there's something python that isn't packaged in a rpm for your os version.
 
There's no rhyme or reason why RedHat did what they did re: python, or at least none that I've ever seen.    You basically always need EPEL on rh-7 based os's.  Things are a bit better with rh-8 based systems in that regard, but rh8 has some other nuances that bite some people.

FWIW if it was me setting up a clean centos system, I'd use 8 just to get it over with and get more recent software...but 7 will keep working til 2024 when it goes end of life.
 

Rich Painter

unread,
Nov 23, 2020, 1:55:53 AM11/23/20
to weewx...@googlegroups.com
Vince,

i understand.

Long story... the CentOS 7 is required for an ICOM radio software called D-STAR ver 3. CO 8 will not work. So, if one is installing new for a system with D-STAR then CO7 it is regardless of the age. The prior ICOM release ver 2 required CO 5 !! We STILL have some of these running !!!

Thanks
rich

--
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