Upgrade to v3

I am on version 2 using a python virtualenv and pip install.

When I run the following command…

~/flexget/bin/pip install --upgrade flexget

…it only takes me up to the latest 2.x branch

How do I go to version 3?



You need to create a new virtualenv using the Python 3 version of virtualenv. Depending on your OS Python 3 will probably be symlinked as python3, pip as pip3, and virtualenv as virtualenv3 (if it’s installed).

I’m certain I did that anyway, because I wanted to get rid of the outdating python 2 nag!

So, these are the exact commands I did back on the 10 August 2019…

sudo apt-get install python3
python3 --version
sudo apt-get install python3-venv
python3 -m venv ~/flexget/
~/flexget/bin/pip install --upgrade pip
~/flexget/bin/pip install flexget

…and this is my Python Virtual Envionment + config file contents which shows version 3.5.2

$ ls -lah ~/flexget
total 36K
drwxrwxr-x  6 paully paully 4.0K 2019-08-19 18:38 .
drwxr-xr-x 32 paully paully 4.0K 2020-02-24 11:59 ..
drwxrwxr-x  3 paully paully 4.0K 2020-02-21 10:28 bin
drwxrwxr-x  2 paully paully 4.0K 2019-08-10 16:16 include
drwxrwxr-x  3 paully paully 4.0K 2019-08-10 16:16 lib
lrwxrwxrwx  1 paully paully    3 2019-08-10 16:16 lib64 -> lib
-rw-rw-r--  1 paully paully  663 2019-08-19 18:39 pip_list_freeze.txt
-rw-rw-r--  1 paully paully   61 2019-08-10 16:19 pip-selfcheck.json
-rw-rw-r--  1 paully paully   69 2019-08-10 16:17 pyvenv.cfg
drwxrwxr-x  3 paully paully 4.0K 2019-08-10 16:17 share

$ cat ~/flexget/pyvenv.cfg 
home = /usr/bin
include-system-site-packages = false
version = 3.5.2



Flexget 3 needs python 3.6+

Ah, my bad… missed that.

OK, I’ll look in to either getting a Python PPA for Ubuntu 16.04 or upgrading to Ubuntu 18.04 in order to get Python 3.6+



The only way I was able to make Python 3.6 work with Flexget in Ubuntu 14.04 was to follow the directions in this Stackoverflow answer to build Python 3.6 myself. The PPAs don’t work properly with Flexget.

Alternatively you could try using docker, though that has its own challenges.

OK, I have tested the addition of python 3.6 to an Ubuntu 16.04 virtual server:-

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install python3.6-venv
apt list --installed python*
which python python3 python3.6

python3.6 --version
python3.6 -m venv ~/flexget3/
cd ~/flexget3/
bin/pip3.6 install --upgrade pip
bin/pip3.6 install --upgrade flexget
~/flexget3/bin/flexget check

…which works with no errors.

How do I now COPY my existing database to this new v3 environment?



FlexGet will use the database file which is in the same folder as your config file. You can find the places it searches for the config here. (It’s called db-config.sqlite)


These commands got my system to the newest pip and ubuntu 18.04.4 running on Pi4. I just use