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
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.
python3 -m venv
would work just as wellapt-get
orpip
: askubuntu.com/questions/431780/apt-get-install-vs-pip-install