Installation problem - python3-cheetah dependency

220 views
Skip to first unread message

Kenneth Sherwood

unread,
May 10, 2020, 2:13:36 AM5/10/20
to weewx-user
I'm trying to install Weewx under Mint 19.2

I've attempted to follow both the Deb package install instructions and the setup.py process. In both cases, I get hung up with an unmet dependency: 

 sudo apt-get install weewx
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: python3-cheetah but it is not installable
E: Unable to correct problems, you have held broken packages.

Attempt to install python3-cheetah also fails: 
sudo apt-get install python3-cheetah
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python3-cheetah 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

---
Any advice? 

Thanks

Greg from Oz

unread,
May 10, 2020, 2:23:35 AM5/10/20
to weewx-user
You could try:
sudo apt install -f

and it might be able to fix itself?

Tom Keffer

unread,
May 10, 2020, 7:31:32 AM5/10/20
to weewx-user
If Greg's suggestion doesn't work, you may have to install it using pip:

python3 -m pip install cheetah3

-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/86773a15-9890-4183-9ec7-7d81bf03902b%40googlegroups.com.

vince

unread,
May 10, 2020, 12:05:42 PM5/10/20
to weewx-user
On Saturday, May 9, 2020 at 11:13:36 PM UTC-7, Kenneth Sherwood wrote:
Package python3-cheetah is not available, but is referred to by another package.
 
Any advice? 


Yes.  Try looking up your exact error message on Google.  https://askubuntu.com/questions/391184/but-is-referred-to-by-another-package-finding-that-package is the first hit that appears. Give that a read and see if that helps any.

  • Did you run 'apt-get update' first ?
  • Did you try 'apt search python3-cheetah' ?
  • How about 'dpkg -l | grep -i cheetah'

What have you tried ?

 

Kenneth Sherwood

unread,
May 10, 2020, 2:12:40 PM5/10/20
to weewx-user
Thanks. Have tried that: 

sherwood@sherwood-IdeaCentre-A730:~$ sudo apt install -f
[sudo] password for sherwood:               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sherwood@sherwood-IdeaCentre-A730:~$ 

Kenneth Sherwood

unread,
May 10, 2020, 2:15:24 PM5/10/20
to weewx-user
Still having trouble. Somehow I think Cheetah is installed but not being recognized: 

sherwood@sherwood-IdeaCentre-A730:~$ python3 -m pip install cheetah3
Collecting cheetah3
    100% |████████████████████████████████| 675kB 1.8MB/s 
Installing collected packages: cheetah3
Successfully installed cheetah3-3.2.4
sherwood@sherwood-IdeaCentre-A730:~$ sudo apt-get install weewx

vince

unread,
May 10, 2020, 2:47:36 PM5/10/20
to weewx-user
On Sunday, May 10, 2020 at 11:15:24 AM UTC-7, Kenneth Sherwood wrote:
Still having trouble. Somehow I think Cheetah is installed but not being recognized: 

sherwood@sherwood-IdeaCentre-A730:~$ python3 -m pip install cheetah3
Collecting cheetah3
    100% |████████████████████████████████| 675kB 1.8MB/s 
Installing collected packages: cheetah3
Successfully installed cheetah3-3.2.4


Good - cheetah 'is' installed via pip3

 
sherwood@sherwood-IdeaCentre-A730:~$ sudo apt-get install weewx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have unmet dependencies:
 weewx : Depends: python3-cheetah but it is not installable
E: Unable to correct problems, you have held broken packages.
 

Again, if you google the 'E' (error) line above you'll see what happened.   Apt can lose its mind.  Very frustrating.

I think if you do the "apt-get install weewx -f" (ie, force it) that somebody else suggested, it might work and run ok.   Might be worth a try.

Now regarding the debian package for weewx v4, I don't know if it's looking for a "package" containing cheetah, or just the existence of cheetah even if it was installed via pip.   If it's the former and your distro doesn't "have" a package, then you're always going to need to force the package to install.  Building packages to cover every os when every os is different is hard.

Tom Keffer

unread,
May 10, 2020, 3:11:46 PM5/10/20
to weewx-user
Hang on. Before you do anything else:

IF you use pip from the weewx root directory it will fail. The reason is that pip sees the weewx.cfg file, and tries to install there.

Change directory someplace else, say your home directory, then try to install cheetah using pip.

I have probably learned this lesson, oh, 20 or 30 times.

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

Greg from Oz

unread,
May 10, 2020, 7:41:03 PM5/10/20
to weewx-user
Hi Tom,

The apt install -f doesn't mean force it means fix broken....if possible. Doesn't always work, but worth a try.

-f, --fix-broken
           Fix; attempt to correct a system with broken dependencies in place. This option, when
           used with install/remove, can omit any packages to permit APT to deduce a likely
           solution. If packages are specified, these have to completely correct the problem. The
           option is sometimes necessary when running APT for the first time; APT itself does not
           allow broken package dependencies to exist on a system. It is possible that a system's
           dependency structure can be so corrupt as to require manual intervention (which
           usually means using dpkg --remove to eliminate some of the offending packages). Use of
           this option together with -m may produce an error in some situations. Configuration
           Item: APT::Get::Fix-Broken.

mwall

unread,
May 10, 2020, 8:18:45 PM5/10/20
to weewx-user


On Sunday, May 10, 2020 at 2:13:36 AM UTC-4, Kenneth Sherwood wrote:
I'm trying to install Weewx under Mint 19.2

as i understand it, mint 19.2 is based on ubuntu 18.04, which is based on debian 10



but apparently your mint cannot find the python3-cheetah package.

to help us diagnose this, could you see if it is listed under python3-cheetah3?  post the result of this:

apt-get list | grep cheetah

here are two options for just getting things to work.

option1: temporarily modify the weewx dependencies.  since you already installed cheetah using pip3, you can tell your system to ignore the weewx package dependency by modifying the locally cached weewx package information.  edit the file /var/lib/dpkg/status - go to the weewx section then modify the Depends line by removing the python3-cheetah part.  next time you do 'sudo apt-get update' this will be replaced with the official one again, so if you want to continue ignoring the dependency you will have to modify the file again.  warning!  you can mess up your system if you scramble this file!

option2: you have installed cheetah directly using pip3, so you have cheetah, just not the cheetah packaged by mint/ubuntu/debian.  so weewx will be able to run.  you could try installing weewx with an option to apt-get that tells it to ignore cheetah (since you already installed it using pip3).  try this:

sudo apt-get install weewx python3-cheetah-

notice the hyphen after cheetah (i'm not sure if this still works - it was in apt-get ages ago)

m

vince

unread,
May 10, 2020, 8:48:30 PM5/10/20
to weewx-user
I did some poking around on the mint website (https://community.linuxmint.com/software) and don't see a python3-cheetah package.  There's a python-cheetah package. Perhaps use the python2 packaged version of weewx if they want to stick with only packages (?)

Unfortunately I can't find an official Mint vagrant box or docker image, so I can't spin up a test system easily enough to fiddle around.

Kenneth Sherwood

unread,
May 11, 2020, 1:33:56 AM5/11/20
to weewx-user
Using the Python 2 version has worked on Linux Mint 19.  Thanks so much. 
Reply all
Reply to author
Forward
0 new messages