fail to install on Ubuntu 20

119 views
Skip to first unread message

Rich Painter

unread,
Oct 11, 2020, 10:48:21 PM10/11/20
to weewx...@googlegroups.com
I followed the instructions on http://weewx.com/docs/apt-get.htm
as root...

1. wget -qO - http://weewx.com/keys.html | sudo apt-key add -
2. wget -qO - http://weewx.com/apt/weewx.list | sudo tee /etc/apt/sources.list.d/weewx.list
3. apt-get update
4. apt-get install weewx

And this is the output of step 4:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 weewx : Depends: python-configobj (>= 4.5) but it is not installable
         Depends: python-serial (>= 2.3) but it is not installable
E: Unable to correct problems, you have held broken packages.

so I tried:
 apt install python-configobj
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-configobj is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-configobj' has no installation candidate

Then this shows python3 is installed on Ubuntu 20:
# python3 --version
Python 3.8.5

Any ideas on what to do to install weewx on Ubuntu 20?

thanks
rich

Greg from Oz

unread,
Oct 12, 2020, 12:43:07 AM10/12/20
to weewx-user
I have a script I run but I use mysql as my database....it also installs other stuff I use as well but that shouldn't affect you.

apt install -y python3-mysqldb
apt install -y python3-usb
apt install -y python3-paho-mqtt
apt install -y python3-dateutil
apt install -y python3-ephem
apt install -y python3-configobj
apt install -y python3-cheetah
apt install -y python3-pil
apt install -y python3-serial
apt install -y python3-pip
apt install -y python3-tz
apt install -y 2to3
apt install -y python3-toolz
apt install -y python3-urllib3 
#The line below is for the decode-config.py program for backing up tasmota devices
python3 -m pip install requests configargparse

echo Install weewx
wget -qO - http://weewx.com/keys.html | sudo apt-key add -
wget -qO - http://weewx.com/apt/weewx-python3.list | sudo tee /etc/apt/sources.list.d/weewx.list
sudo apt-get update
sudo apt-get install -y weewx 

Tim Tuck

unread,
Oct 12, 2020, 12:49:26 AM10/12/20
to weewx...@googlegroups.com
Hi Rich,

Which Ubuntu 20 did you install on ? server or workstation ?

I installed mine on server

1st thing....

 sudo apt update
 sudo apt upgrade -y

then I checked that python was OK

timt@metoffice:~$ python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
timt@metoffice:~$

then

wget -qO - http://weewx.com/keys.html | sudo apt-key add -
wget -qO - http://weewx.com/apt/weewx-python3.list | sudo tee
/etc/apt/sources.list.d/weewx.list
sudo apt install apache2
sudo apt-get install weewx

and it was good to go from there.

cheers

Tim


Greg from Oz

unread,
Oct 12, 2020, 1:01:35 AM10/12/20
to weewx-user
Ubuntu 20.04 doesn't have Apache2 installed by default like Ubuntu used to do when selecting a LAMP server.
It is just a generic server as far as I can tell.

Tim Tuck

unread,
Oct 12, 2020, 1:39:16 AM10/12/20
to weewx...@googlegroups.com
Hi Greg,

Yes, if you build from the server ISO, its a basic server with nearly
nothing installed, it expects you to install the apps you want.

I didn't want LAMP ( which I think was a menu item ) so I just installed
Apache2 and a few other bits manually.

Building from the base server ISO is a good way to minimise the size of
the build. Its also more secure and less patches to worry about.

My server is a testing ground for my 4.x build that I will eventually
build on a Pi.

cheers

Tim

Rich Painter

unread,
Oct 12, 2020, 1:40:39 AM10/12/20
to weewx...@googlegroups.com
Tim, Greg,

clean install of ubuntu mate 20.04.1 LTS Desktop, including dev tools. ssh, no apache
this installs by default python3:
Python 3.8.5  (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux

all updates were run prior to attempt with weewx. then followed
1. wget -qO - http://weewx.com/keys.html | sudo apt-key add -
2. wget -qO - http://weewx.com/apt/weewx.list | sudo tee /etc/apt/sources.list.d/weewx.list
3. apt-get update
4. apt-get install weewx

where step 4 had the reported failures.
 weewx : Depends: python-configobj (>= 4.5) but it is not installable
         Depends: python-serial (>= 2.3) but it is not installable

looking at the installed python3 components, apt reports in part:
python3-configobj/focal,focal,now 5.0.6-4 all [installed,automatic]

BUT NO python3-serial !!

So, why is the installer complaining about python-configobj when ver 5.0.6-4 clearly is >= 4.5
And why is python3-serial missing from the standard python (and apparently not installable) if it is required by weewx?

I'm a C and unix guy and know nothing about python....

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/5ebc1cc9-dd42-bf46-6509-8ecdc0652d9a%40skybase.net.


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


Greg from Oz

unread,
Oct 12, 2020, 1:47:49 AM10/12/20
to weewx-user
I know nothing about python either.
The directions I used for 20.04 was here:
That's why it says:
wget -qO - http://weewx.com/apt/weewx-python3.list | sudo tee /etc/apt/sources.list.d/weewx.list
and not 
wget -qO - http://weewx.com/apt/weewx.list | sudo tee /etc/apt/sources.list.d/weewx.list

and maybe that is why your install failed as what you were running was for python 2?


To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Tim Tuck

unread,
Oct 12, 2020, 1:52:50 AM10/12/20
to weewx...@googlegroups.com
Hi Rich,

Ok something weird going on there, you might like to reinstall python3

I just checked my default install and I have this...

timt@metoffice:~$ pip3 freeze|grep serial
pyserial==3.4
timt@metoffice:~$

You might like to try ...

sudo apt reinstall python3

to see if that fixes things.

cheers

Tim

Rich Painter

unread,
Oct 12, 2020, 2:01:23 AM10/12/20
to weewx...@googlegroups.com
Tim, Greg,

ah

I followed the instructions at http://www.weewx.com/docs/apt-get.htm

which did NOT differentiate the python versions.

changing the repo and installing weewx now works!

Thanks!!!
rich

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/e6361451-1399-43b0-a0e0-b08a0e12727ao%40googlegroups.com.

Tim Tuck

unread,
Oct 12, 2020, 2:09:23 AM10/12/20
to weewx...@googlegroups.com

Good catch Greg !

I wasn't paying attention to the repo Rich was pulling from.

cheers

Tim

Greg from Oz

unread,
Oct 12, 2020, 2:24:52 AM10/12/20
to weewx-user
Yes there are too many instructions on how to install weewx you just have to find the right one. :-)

That's why I wrote a script to install apache2 then all the python3 stuff I need and then install weewx.

I can build a server and then just run the script which also creates the user weewx and gives the mysql permissions etc so it just works for me and I don't have to go and try to remember how I installed it last time.



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


--
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...@googlegroups.com.

Tom Keffer

unread,
Oct 12, 2020, 8:28:09 AM10/12/20
to weewx-user
Sorry for that old install page! I've removed it.

Reply all
Reply to author
Forward
0 new messages