Create virtual python3 environment

python3 -m venv .venv --upgrade-deps
source .venv/bin/activate
pip install package

Instead of sourcing, you can use bin path ./venv/bin/pip3 install --upgrade PACKAGE or set the venv bin folder before existing path PATH=./venv/bin:$PATH

Interactive python

python -i .py file

List outdated packages

pip list --outdated