Skip to content

Install on Linux

Oliver Tseng edited this page Jul 2, 2021 · 21 revisions

Set up "Unique Bible App" on Linux

Basically, you simply need to download UBA and run it if you have Python and git in place.

Steps to set up for a fresh installation:

  1. Install Python and git

  2. Download UBA

  3. Run UBA

Prepare for Installation

Get python ready!

UBA is a python-based application, so you need to have Python installed to run UBA.

Minimum Python version for running UBA: 3.7

There are several different ways to install Python, read more information at: https://www.python.org/downloads/

Below is one of the options we tested:

sudo apt install -y make build-essential python3 python-setuptools python3-pip python3-dev python3-venv libssl-dev libffi-dev libnss3 zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Read more at: https://github.com/pyenv/pyenv/wiki#suggested-build-environment

Get git ready! [optional]

There are different ways to download UBA, we use git in the following example.

To install git, run on terminal:

sudo apt install -y git

Don't want to use git? You can download a zip package of UBA and unzip it instead of using git:

https://github.com/eliranwong/UniqueBible/archive/master.zip

Download UBA & Run

You simply need to download and run. Everything else will be set up for you automatically the first time you run UBA.

To download:

git clone https://github.com/eliranwong/UniqueBible

To run:

python3 UniqueBible/uba.py

A screenshot is provided here, so you may know what to expect during the first-time setup:

UBA should look like this screenshot below the first time you run it:

Desktop Application Shortcut

A desktop shortcut "UniqueBibleApp.desktop" is generated for you automatically the first time you run UBA.

The shortcut file is automatically copied to ~/.local/share/applications

You should be able to find it with gui Launcher, depending on what Linux distribution you use.

Create a command alias [optional]:

You can run UBA with terminal without typing a fullpath, by creating an alias.

Below is an example:

This example only works if:

  1. You use bash

  2. The following example assumes that you install UBA in your home directory. You need to change the path if you install at a different location.

echo "alias uba='$HOME/UniqueBible/uba.py'" >> ~/.bashrc

Close and reopen your terminal app, you should then be able to run UBA with this simple command:

uba

Our setup script automatically makes file "uba.py" executable, but in case it is not running, you may need to set permission on it manually:

chmod u+x $HOME/UniqueBible/uba.py

Extra information on Windows Subsystem for Linux (ver 2)

You may read more about WSL2 setup at:

https://github.com/eliranwong/wsl2/blob/master/bible_apps/desktop.md

General troubleshooting

If you get the message, Required feature 'xxxx' is not enabled. Install either 'PySide2' or 'PyQt5' first!

Try to manually install all the required packages to see what is the problem:

  1. source venv/bin/activate

  2. pip install -r requirements.txt

  3. pip list

  4. Manually import packages

$ python
Python 3.9.5
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from qtpy import QtGui
>>> from PySide2.QtWidgets import QApplication
>>> from PyQt5 import QtGui

CentOS troubleshooting tips

If you get the message, "ImportError: libGL.so.1: cannot open shared object file: No such file or directory"

Run yum install mesa-libGL

Debian troubleshooting tips

If you get the message, Required feature 'xxxx' is not enabled. Install either 'PySide2' or 'PyQt5' first!

Try the following:

# Need to install pip3
sudo apt-get install python3-venv python3-pip
pip3 install --upgrade pip

# Install pyqtwebengine
sudo apt-get install python3-pyqt5.qtwebengine
pip3 install pyqtwebengine

# Enable QT debugging and start up UBA to see what the error is
export QT_DEBUG_PLUGINS=1
python3 main.py

# If libxcb-util.so.1 is not found, create a symlink from libxcb-util.so.0
sudo ln -fs /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

Troubleshooting installation on Ubuntu

If you encountered running UBA with the following message:

''' This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb. '''

Run the following line to install a Qt platform plugin:

sudo apt install qt5dxcb-plugin

Extra information on Chrome OS

You may find extra information from our instructions on installing UBA on Chrome OS:

https://github.com/eliranwong/UniqueBible/wiki/Install-on-Chrome-OS

Clone this wiki locally