-
-
Notifications
You must be signed in to change notification settings - Fork 36
Install UBA on Windows via WSL2 Ubuntu
On Windows, there are two major ways you can run Unique Bible App (UBA) desktop version:
-
Setup python library on Windows and run UBA. For this option, read https://github.com/eliranwong/UniqueBible/wiki/Install-on-Windows
-
Install UBA via Windows Subsystem for Linux (version 2)
We think the second option is better as UBA run faster, more reliable and more flexible. Some UBA features may work only with second option but not with the first. We are going to briefly describe how to install UBA on Windows via WSL2 on this wiki page.
The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.
The default version of the latest WSL is version 2, which supports running our Unique Bible App desktop version.
Read more at: https://learn.microsoft.com/en-us/windows/wsl/about
You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 to use the commands below.
Read more at https://learn.microsoft.com/en-us/windows/wsl/install
Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting "Run as administrator", enter the wsl --install command, then restart your machine.
-
Right-click Windows icon, select Terminal (Admin)
-
Run:
wsl --install
- Re-start Windows when it finish.
After Windows is restarted, enter your username and password the first time you run Ubuntu via WSL2
Run in WSL terminal:
sudo apt update && sudo apt -y dist-upgrade
(Remarks: Password entry is required once when you first use "sudo" in a single session.)
sudo apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates apt-utils build-essential cmake tree wget curl git zip unzip xz-utils nano micro w3m lynx lib32stdc++6 sqlite3 libsqlite3-dev libasound2 libnss3 libncurses5 libncurses5-dev libgl1-mesa-dev mesa-utils libglu1-mesa lsb-release binutils ffmpeg gawk opencc plocate gnome-keyring libssl-dev libffi-dev libstdc++5 libpci3 libpci-dev python3 python3-setuptools python3-pip python3-dev python3-venv zlib1g-dev libgdbm-dev libnss3-dev libreadline-dev libbz2-dev gcc xorg-dev exo-utils dex gthumb nautilus xdg-utils
Run in WSL terminal:
cd UniqueBible
python3 uba.py
(Remarks: It takes time for initial setup the first time when you will run UBA.)
UBA supports Qt library PySide6, PySide2 and PyQt5. If you prefer using PyQt5 on Ubuntu, follow the steps below:
-
Quit UBA first
-
Install PyQt5 packages on Ubuntu, run:
sudo apt install python3-pyqt5 python3-pyqt5.sip python3-pyqt5.qtmultimedia python3-pyqt5.qtwebengine python3-pyqt5.qtwebchannel
- Edit file "config.py", located in UBA home directory:
qtLibrary = 'pyqt5'
- Remove existing venv* directories, by running
cd UniqueBible
rm -rf venv*
- Create an empty file "use_system_site_packages" in UniqueBible home directory, by running:
cd UniqueBible
touch use_system_site_packages
- Run UBA again:
python3 uba.py
You can launch Ubuntu terminal directly from taskbar
Alternately, you can select Ubuntu after you launch Windows Powershell
You may also set WSL Ubuntu as the default terminal in Windows Powershell settings