-
Notifications
You must be signed in to change notification settings - Fork 81
Install SickGear [3] Ubuntu
SickGear Wiki: Home | Reporting Issues | Frequently Answered Questions | > Install Guides <
- Method 1: Install manually
- Method 2: Install with pyenv
- Method 3: Install using Snap
- Upgrade from using Python2 to Python3
From FAQ...
2020.11.27 test successful with clean installation using ubuntu-20.04.1-desktop-amd64.iso
First, update
sudo apt-get update
Install required dependencies
sudo apt-get install git unrar-free -y
Clone the repository to an install location, in this case /opt/sickgear
Update the commands with the user to run SickGear as, in this case it is user1
sudo git clone https://github.com/SickGear/SickGear.git /opt/sickgear
sudo chown user1 -R /opt/sickgear
with a clean vanilla Ubuntu install, python3
is available, but pip requires installation...
sudo apt install python3-pip
Install Python dependancies for SickGear using pip
cd /opt/sickgear
python3 -m pip install -r requirements.txt
python3 -m pip install -r recommended.txt
Check that the Cheetah3
dependancy is available to Python
python3 -m pip list
Start SickGear
sudo -u user1 python3 ./sickgear.py
You should be able to access SickGear at http://localhost:8081.
It failed? Run python -V
and make sure you are NOT trying to use Python version 3.0 - 3.6 incl. ;)
If you want SickGear to start at boot
For systemd, there is a startup script in... sickgear/init-scripts/
, edit its ExecStart
to fit your Python(2/3)
Otherwise,
sudo nano /etc/init/sickgear.conf
Copy and paste the following into the file.
description "Upstart jobs for SickGear"
setuid user1
start on runlevel [2345]
stop on runlevel [016]
respawn
exec /opt/sickgear/sickgear.py
Copy the following into a new file created at /etc/default/sickgear
SG_HOME=/opt/sickgear
SG_DATA=/opt/sickgear/data/
SG_USER=user1
Now make sure SickGear isn't running and start the service.
Run the service
sudo service sickgear start
All done, you can access SickGear at http://localhost:8081
If using etc/init/
, then you may need to # update-rc.d sickgear enable [2345]
(thanks @kevin201)
Thanks to stepjohn for donating this guide.
pyenv provides isolated Python versions of your choice for use with SickGear.
First, update
sudo apt-get update
Install Python development dependencies...
Clone the repository to where you want to install it, in this case /opt/sickgear
Run the commands with the user you wish to run SickGear as.
In this case it's going to be user1.
The commands below are run as as user1.
sudo apt install git
sudo git clone https://github.com/SickGear/SickGear.git /opt/sickgear
sudo chown user1 -R /opt/sickgear
Expand (To build Python using Pyenv)
First, follow suggested Pyenv build environment
then...
git clone https://github.com/yyuu/pyenv /opt/sickgear/.pyenv
Install the desired python version
PYENV_ROOT=/opt/sickgear/.pyenv /opt/sickgear/.pyenv/bin/pyenv install 3.9.13
Note: a systemd file must be edited with the path to the pyenv Python
^^^^^
Install SickGear dependencies
cd /opt/sickgear
/opt/sickgear/.pyenv/versions/3.9.13/bin/pip install -r requirements.txt
/opt/sickgear/.pyenv/versions/3.9.13/bin/pip install -r recommended.txt
Start SickGear
/opt/sickgear/.pyenv/versions/3.9.13/bin/python /opt/sickgear/sickgear.py
You can access SickGear at http://localhost:8081.
Now, if you want SickGear to start at boot, make sure SickGear isn't running, then...
sudo cp /opt/sickgear/init-scripts/init.ubuntu /etc/init.d/sickgear
echo "PYTHON_BIN=/opt/sickgear/.pyenv/versions/3.9.13/bin/python" | sudo tee /etc/default/sickgear
echo "RUN_AS=user1" | sudo tee -a /etc/default/sickgear
update-rc.d sickgear defaults
Start the service.
sudo service SickGear start
All done, you can access SickGear at http://localhost:8081
For example, Ubuntu 19.04 has python3, and the version is 3.7.1 or higher (e.g. 3.7.5)...
cd /opt/sickgear
python3 -m pip install -r requirements.txt
python3 -m pip install -r recommended.txt
Don't worry if the recommended.txt
install partly fails, these are optional libs.
Replace the normal startup call with: python3 /opt/sickgear/sickgear.py
.
Replace startup script references to python3.
If running Ubuntu 16.04 LTS (Xenial Xerus) or later, Snap is already installed, skip to step 2
-
Install Snap...
sudo apt update
sudo apt install snapd
-
Install and run SickGear (you must
sudo
)...sudo snap install sickgear
-
sudo /snap/bin/sickgear
(usewhich sickgear
to find path, e.g./snap/bin/sickgear
)
SickGear will exit with a data directory write permission fail message if you do not use sudo
All done, you can access SickGear at http://localhost:8081
To auto start at boot time... (thanks to @kevin201 - Mar 4 2020)
- Edit or create
/etc/rc.local
- Add
/snap/bin/sickgear -d
(items inrc.local
run as root sosudo
not reqd.) - Save, exit, then reboot
A ps aux | grep gear
should output something similar to ...
root 1121 7.3 2.6 1284172 102860 ? Sl 21:11 0:10 python /snap/sickgear/703/sickgear/sickgear.py --datadir=/var/snap/sickgear/common/data
SickGear About page via snap installer in an Ubuntu VM on Windows |
---|
![]() |
System locale must have utf-8 to support show names like "Les Misérables" |
![]() |