The Python virtual environment cannot be called directly from mayapy. Instead a soft link needs to be made to mayapy from a command called "python" within the same directory, and venv needs to be called from this python command.
Open a command window and change directory to C:\Program Files\Autodesk\Maya<VersionNumber>\bin\.
bin> mklink python.exe mayapy.exe symbolic link created for python.exe <<===>> mayapy.exe
bin> python -m venv_dir
Open a terminal window and change directory to /Applications/Autodesk/maya<VersionNumber>/Maya.app/Contents/bin/ .
$ ln -s -f mayapy python $ ls -l python lrwxr-xr-x 1 user staff 6 6 Oct 16:29 python -> mayapy
bin> python -m venv_dir
Open a terminal window and change directory to /usr/autodesk/Maya<VersionNumber>/bin/.
$ ln -s -f mayapy python $ ls -l python lrwxr-xr-x 1 user staff 6 6 Oct 16:29 python -> mayapy
bin> python -m venv_dir