$ python3 -m virtualenv -p python3 foo Already using interpreter /usr/bin/python3 Using base prefix '/usr' /usr/lib/python3/dist-packages/virtualenv.py:1090: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp New python executable in /tmp/foo/bin/python3 Also creating executable in /tmp/foo/bin/python Installing setuptools, pkg_resources, pip, wheel...done. $ . ./foo/bin/activate $ pip list Package Version ------------- ------- pip 21.3.1 pkg_resources 0.0.0 setuptools 60.3.0 wheel 0.37.1 $ python -m pip list /tmp/foo/bin/python: Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')