Move virtualenv management to python class