Installing python through pyenv
Pyenv is a tool to install and manage side by side python installations. It's generally used for development, but can be used for production environments as well.
Installing pyenv is simple, we can use the installer. The installer installs pyenv to ~/.pyenv along with tools to build various python versions.
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
Follow the instructions given by the installer on how to enable the pyenv command.
You will also need the common build tools for python environments, more details here: https://github.com/yyuu/pyenv/wiki/Common-build-problems
Install a python environment by running:
pyenv install 2.7.10
After that you can select a python version to run by going to the sickgear installation directory and running
pyenv local 2.7.10
pip install -r requirements.txt
The latter command is used to install all the dependencies. Since pyenv installs a separate installation of python, your system modules are unavailable inside the pyenv python installation.
If you wish to run sickgear as a daemon, you need to set the python binary to point to the python shim, and it will automatically pick the right python to run (based on the local selection). The shim path is in the .pyenv
directory, for example: /home/sickgear/.pyenv/shims/python