Server 20.04 verses 16.04: python-gnuplot

Rafael David Tinoco rafaeldtinoco at ubuntu.com
Mon Jan 20 01:01:15 UTC 2020


>
> I have been unable to get it working on a new 20.04 installation.
> If I attempt to install "python-gnuplot" I get:
>
> > Package python-gnuplot 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
> > However, the following packages replace it:
> >  python3-gnuplot
> >
> > E: Package 'python-gnuplot' has no installation candidate
>

Using 20.04 (still in development) might get you in trouble like this =).
Looking at the header of intel_pstate_tracer.py you will see that it
requires python2:

"""
Prerequisites:
    Python version 2.7.x
    gnuplot 5.0 or higher
    gnuplot-py 1.8
"""

So you either "port" this script to use with python3 (might be easy as it
looks simple and very monolithic) OR, for now, your devel machine should
stay as an Ubuntu Eoan, that still contains python2.

Note: you can always use LXD and have a container - with Ubuntu Eoan - with
all needed tools - just like I did to check all this - instead of
installing X libraries (for gnuplot) in your machine
directly.

$ lxc launch ubuntu:eoan gnuplotcontainer

That easy =o). Check:

https://github.com/rafaeldtinoco/provision

specially:

https://github.com/rafaeldtinoco/provision/blob/master/lxd/profiles/default.yaml

You can use that yaml file after configuring LXD:

$ lxc profile edit default < default.yaml

and then

$ lxc launch ubuntu:eoan gnuplotcontainer

and your container will be provisioned using cloud-init just like you
described in the yaml file. Very simple! Your kernel source directory can
be also shared among the containers (just like that yaml file shows also).

If I try to install "python3-gnuplot", it wants to convert
> my server installation into a full blown desktop. I do not
> want that. Even if I do allow it (i.e. I did already, by mistake),
> the script still doesn't work:
>

You can try not installing recommends (which is the default option for apt):

$ sudo apt-get install --no-install-recommends gnuplot     OR

$ sudo apt-get install --no-install-recommends python3-gnuplot

Makes a big difference and might be enough for your case. Package
python-gnuplot doesn't exist any longer because python2 is being removed
from 20.04.

I hope all this helps you!

Cheers o/

-rafaeldtinoco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20200119/2d53076c/attachment.html>


More information about the ubuntu-server mailing list