Can't install Weewx on Ubuntu 20.04

239 views
Skip to first unread message

Redig

unread,
Apr 29, 2020, 9:42:19 PM4/29/20
to weewx-user
I decided to set up a new server the other day and installed the latest Ubuntu LTS to get started. After installing some of my packages, I decided to try out weewx to integrate with my new ecowitt system.

sudo apt--get install weewx

returns

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.


sudo apt-get install python-configobj

returns

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

I've tried apt-get update, upgrade, dist-upgrade,  autoclean, autoremove and rebooted.
I've tried pip, but it seems to only have configobj, not python-configobj and does not change the weewx warning.

It seems that these packages are not available on Ubuntu 20.04.

Should it be possible to run weewx 3 on Ubuntu 20.04?

Greg from Oz

unread,
Apr 30, 2020, 1:45:13 AM4/30/20
to weewx-user
Have you tried apt install -f

iain MacDonnell

unread,
Apr 30, 2020, 1:45:20 AM4/30/20
to weewx-user

It appears that python 2 support is dropped in Ubuntu 20.04 (https://www.fosslinux.com/26413/ubuntu-20-04-lts-focal-fossa-set-to-remove-python-2.htm), and since weewx 3 is based on python 2, I think (unofficially) that that would be a "no" (at least not without a fight). weewx 4 should work, of course.

    ~iain

Greg from Oz

unread,
Apr 30, 2020, 3:57:27 AM4/30/20
to weewx-user
You can install python 2 on Ubuntu 20.04 if you REALLY wanted to.....but why if it is no longer supported.

$ sudo apt install python2
OR
$ sudo apt install python-minimal


On Thursday, 30 April 2020 11:42:19 UTC+10, Redig wrote:

mwall

unread,
Apr 30, 2020, 7:19:38 AM4/30/20
to weewx-user


On Wednesday, April 29, 2020 at 9:42:19 PM UTC-4, Redig wrote:

I've tried apt-get update, upgrade, dist-upgrade,  autoclean, autoremove and rebooted.
I've tried pip, but it seems to only have configobj, not python-configobj and does not change the weewx warning.

It seems that these packages are not available on Ubuntu 20.04.

Should it be possible to run weewx 3 on Ubuntu 20.04?

yes, it is possible.  at the very least you could do a setup.py installation, which would avoid ubuntu package names

perhaps ubuntu renamed 'python-configobj' to 'python2-configobj'?

if you installed configobj using pip, then you *should* be able to use the '-f' option to tell apt to ignore the dependencies

the package names in ubuntu have always varied a bit from those in debian.  sometimes that makes it slightly annoying to build a single package that works everywhere, sometimes that makes it impossible.

"end of life" for python2 does not really matter.  the software will continue to work.  as long as it does what you need, keep using it.

fwiw, i have weewx systems that will NEVER see python3 - python2 works just fine and the hardware does not have the resources for python3.  i know a space telescope that is running python2 and will never get an upgrade (if you think its hard to update a NAS or router, try doing a satellite - i have great respect for the folks who keep spacecraft operational well beyond their designed mission :). the ground systems probably will not get changed over to python3 for at least another couple of years, and that will only be due to dependencies on scipy, numpy, matplotlib, and the need to use some recent AI and optimization techniques that are only in python3.

m

bob

unread,
Apr 30, 2020, 8:31:46 AM4/30/20
to weewx-user
I have the same issue as Redig on Ubuntu 20.04

Gerg from Oz -

sudo apt install python2 shows the latest is already installed.
sudo apt install python-minimal shows no installation candidate.

After many hours I concluded that I wasn't going to get the required packages for weewx3 installed and gave up.

I did get weewx4 (development version using python3) going by going through the compile procedure.



On Wednesday, April 29, 2020 at 9:42:19 PM UTC-4, Redig wrote:

Redig

unread,
Apr 30, 2020, 8:39:36 AM4/30/20
to weewx-user
Thanks for the help. 
In my case, I came to weewx looking for a way to bring ecowitt data into Home Assistant without a third party cloud service. The weewx UI looked like a nice bonus. I ended up on 20.04 just because it was the most recent LTS when I started.

I am doing this as a hobby at home, and I don't use Linux often. I expect to put a variety of software on this server, such as crashplan, pihole, etc.

In my case, do you think it make sense to continue with 20.04?

Tom Keffer

unread,
Apr 30, 2020, 8:40:20 AM4/30/20
to weewx-user
I've got weewx v3 running on Ubuntu 20.04, although I did it through pip.

An embarrassing disclosure, but I don't normally follow the setup.py installation instructions. I try not to install dependencies globally, because I want as close to a "virgin" python install as possible. This makes testing more straightforward. 

Instead, I use pyenv. Then

pyenv shell 2.7.18
pip install configobj
pip install Cheetah
pip install Pillow
pip install pyserial
pip install pyusb
pip install ephem

-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/b3b17796-d03d-4bbd-847c-9a323291e748%40googlegroups.com.

Tom Keffer

unread,
Apr 30, 2020, 8:43:10 AM4/30/20
to weewx-user
Regarding 20.04: I've been running it for 3 or 4 days now. Mostly it works great, but there are a few things that have not been ported yet, although you are unlikely to run into them. For example, hp's printing utility hplip. 

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

Wes Witt

unread,
Apr 30, 2020, 6:45:52 PM4/30/20
to weewx-user
today i moved my server to ubuntu 20.04.  i did a new install of ubuntu 20.04 and then migrated my data, etc. to the new instance of the server.  i installed weewx 4.0 and the latest version of belchertown skin. in addition i moved my weewx mysql database so that i'd keep all my historical data.  everything worked great and weewx is up and running.  the only issue i had was some python code in my custom driver needed to change because of the move to python 3.
Reply all
Reply to author
Forward
0 new messages