$ export VENVDIR=~/test-python
$ python3 --version
Python 3.8.3
$ python3 -m venv $VENVDIR
$ cd $VENVDIR
$ ls
README.md bin include lib pyvenv.cfg
$ source $VENVDIR/bin/activate
$ python --version
Python 3.8.3
With the VirtualEnv activated:
$ python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/9b/e6/aa8149e048eda381f2a433599be9b1f5e5e3a189636cd6cf9614aa2ff5be/pip-22.1.1-py3-none-any.whl (2.1MB)
|████████████████████████████████| 2.2MB 4.4MB/s
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-22.1.1
$ pip --version
pip 22.1.1 from .../lib/python3.8/site-packages/pip (python 3.8)