Jan 30, 2015

Installing Flexget as local user

I've been using Flexget for some quite time now and under Gentoo, and possibly other distros, there's a big flaw if you just install it using root. The main problem resides when you update Flexget, since it usually ends overwriting the python-exec and setup-tools binaries and breaking emerge, pip or any other important python binary.

The solution behind this problem is to install Flexget as a normal user, since when upgrading it shouldn't be able to touch any important binary.

Installing Flexget

As a prerequisite you need pip (at least the one for python2.7) and setup-tools installed as root. Once the prerequisites are met, you can install Flexget with the following:
pip2 install --user flexget

That will download, build and install all the needed components under the .local folder inside your user's home directory. The Flexget binary will be in $HOME/.local/bin

If you have Flexget already installed as root, you would need to uninstall it first, check that the prerequisites are met and then change to the user you want to install from and run the above command.

Updating Flexget

The update command when Flexget is installed as a normal user is the same as it would be as root but adding the --user flag:
pip2 install --upgrade --user flexget