What is the correct way of installing virtualenv for Python? Should I do sudo apt-get install python3-virtualenv or pip3 install virtualenv? I'm using Ubuntu 19.04.


1 Answer 1


Both options are correct. It depends on which package manager you want to keep track of this package: apt or pip.

Whichever one you choose, then you'll need to update it from there in the future. This question is opinion based. In my opinion, I would install it with apt. This way, whenever you upgrade your entire system, the virtualenv python package/module will also be upgraded.

You must log in to answer this question.