No module named rubber

Asked by Mohammad Samani

I installed gedit-latex-plugin successfully. I also installed rubber
sudo apt update
sudo apt install rubber

But when I try to build a pdf file from a tex file, I see this error message:

Traceback (most recent call last):
  File "/usr/bin/rubber", line 5, in <module>
    from rubber.cmdline import Build, Clean
ModuleNotFoundError: No module named 'rubber'

Calling rubber from the command prompt has the same effect.
I am running
Ubuntu 18.04.6 LTS.
gedit 3.28.1
LaTeX Plugin 3.20.0

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gedit-latex-plugin Edit question
Assignee:
No assignee Edit question
Solved by:
Mohammad Samani
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Which python version do you have defined as your default?

For diagnostic purposes, what is the output of the following commands:

uname -a
lsb_release -crid
python --version
apt policy rubber
ls -ld /usr/lib/python2.7/dist-packages/rubb*
ls -l /usr/lib/python2.7/dist-packages/rubber/cm*

Revision history for this message
Mohammad Samani (msamani) said :
#2

$ uname -a
Linux pc-000-1295 4.15.0-176-generic #185-Ubuntu SMP Tue Mar 29 17:40:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic

$ python --version
Python 3.10.4

$ apt policy rubber
rubber:
  Installed: 1.4-2
  Candidate: 1.4-2
  Version table:
 *** 1.4-2 500
        500 https://artifactory.dwavesys.local/debian-remote bionic/universe amd64 Packages
        500 https://artifactory.dwavesys.local/debian-remote bionic/universe i386 Packages
        100 /var/lib/dpkg/status

$ ls -ld /usr/lib/python2.7/dist-packages/rubb*
drwxr-xr-x 4 root root 4096 May 5 11:04 /usr/lib/python2.7/dist-packages/rubber
-rw-r--r-- 1 root root 855 Jan 22 2016 /usr/lib/python2.7/dist-packages/rubber-1.4.egg-info

$ ls -l /usr/lib/python2.7/dist-packages/rubber/cm*
-rw-r--r-- 1 root root 21167 Dec 11 2015 /usr/lib/python2.7/dist-packages/rubber/cmdline.py
-rw-r--r-- 1 root root 23802 May 5 11:04 /usr/lib/python2.7/dist-packages/rubber/cmdline.pyc

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Rubber version 1.4-2 as configured for Ubuntu 18.04 is working only with python 2.7
You have to reconfigure your system such that the "python" command starts python2.7

Revision history for this message
Mohammad Samani (msamani) said :
#4

Thank you!