We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
python_venv language fails to use python3 interpreter and is using python2.7 instead
Apparently pre-commit failed to use python3 interpreter when I tried to add a hook and thus failed because venv module was not installed on default python2.7!

```
$ pre-commit try-repo ../python-license-check                                                                                                                                                                   [19:55:27]
[INFO] Initializing environment for ../python-license-check.
===============================================================================
Using config:
===============================================================================
repos:
-   repo: ../python-license-check
    rev: 4048cf3844dbbf45690c153a7da7f532585ec87c
    hooks:
    -   id: liccheck
===============================================================================
[INFO] Installing environment for ../python-license-check.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: Command: ('/Users/ssbarnea/.pyenv/versions/2.7.14/bin/python2.7', '-mvenv', '/var/folders/br/99tfdvcs3vvfwdk69z7f0xmc0000gn/T/tmpayl0P5/repoHa7_qe/py_venv-python2.7')
Return code: 1
Expected return code: 0
Output: (none)
Errors:
    /Users/ssbarnea/.pyenv/versions/2.7.14/bin/python2.7: No module named venv


Check the log at /Users/ssbarnea/.cache/pre-commit/pre-commit.log
FAIL: 1
ssbarnea@smac: ~/os/jira master ⚡ $ cat ../python-license-check/.pre-commit-hooks.yaml                                                                                                                                                            [19:55:34]
-   id: liccheck
    name: Validates dependency licenses for Python packages
    description: This validator validates a pre-commit hooks manifest file
    entry: liccheck -s setup.cfg -r requirements.txt
    language: python_venv
```

Based on the documentation I was expecting to see pre-commit using the `python3` executable for calling venv module. 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pre_commit/languages/python_venv.py`
Content:
```
1 from __future__ import unicode_literals
2 
3 import os.path
4 
5 from pre_commit.languages import python
6 from pre_commit.util import CalledProcessError
7 from pre_commit.util import cmd_output
8 
9 
10 ENVIRONMENT_DIR = 'py_venv'
11 
12 
13 def orig_py_exe(exe):  # pragma: no cover (platform specific)
14     """A -mvenv virtualenv made from a -mvirtualenv virtualenv installs
15     packages to the incorrect location.  Attempt to find the _original_ exe
16     and invoke `-mvenv` from there.
17 
18     See:
19     - https://github.com/pre-commit/pre-commit/issues/755
20     - https://github.com/pypa/virtualenv/issues/1095
21     - https://bugs.python.org/issue30811
22     """
23     try:
24         prefix_script = 'import sys; print(sys.real_prefix)'
25         _, prefix, _ = cmd_output(exe, '-c', prefix_script)
26         prefix = prefix.strip()
27     except CalledProcessError:
28         # not created from -mvirtualenv
29         return exe
30 
31     if os.name == 'nt':
32         expected = os.path.join(prefix, 'python.exe')
33     else:
34         expected = os.path.join(prefix, 'bin', os.path.basename(exe))
35 
36     if os.path.exists(expected):
37         return expected
38     else:
39         return exe
40 
41 
42 def make_venv(envdir, python):
43     cmd_output(orig_py_exe(python), '-mvenv', envdir, cwd='/')
44 
45 
46 get_default_version = python.get_default_version
47 _interface = python.py_interface(ENVIRONMENT_DIR, make_venv)
48 in_env, healthy, run_hook, install_environment = _interface
49
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pre_commit/languages/python_venv.py b/pre_commit/languages/python_venv.py
--- a/pre_commit/languages/python_venv.py
+++ b/pre_commit/languages/python_venv.py
@@ -1,6 +1,7 @@
 from __future__ import unicode_literals
 
 import os.path
+import sys
 
 from pre_commit.languages import python
 from pre_commit.util import CalledProcessError
@@ -10,6 +11,13 @@
 ENVIRONMENT_DIR = 'py_venv'
 
 
+def get_default_version():  # pragma: no cover (version specific)
+    if sys.version_info < (3,):
+        return 'python3'
+    else:
+        return python.get_default_version()
+
+
 def orig_py_exe(exe):  # pragma: no cover (platform specific)
     """A -mvenv virtualenv made from a -mvirtualenv virtualenv installs
     packages to the incorrect location.  Attempt to find the _original_ exe
@@ -43,6 +51,5 @@
     cmd_output(orig_py_exe(python), '-mvenv', envdir, cwd='/')
 
 
-get_default_version = python.get_default_version
 _interface = python.py_interface(ENVIRONMENT_DIR, make_venv)
 in_env, healthy, run_hook, install_environment = _interface

{"golden_diff": "diff --git a/pre_commit/languages/python_venv.py b/pre_commit/languages/python_venv.py\n--- a/pre_commit/languages/python_venv.py\n+++ b/pre_commit/languages/python_venv.py\n@@ -1,6 +1,7 @@\n from __future__ import unicode_literals\n \n import os.path\n+import sys\n \n from pre_commit.languages import python\n from pre_commit.util import CalledProcessError\n@@ -10,6 +11,13 @@\n ENVIRONMENT_DIR = 'py_venv'\n \n \n+def get_default_version():  # pragma: no cover (version specific)\n+    if sys.version_info < (3,):\n+        return 'python3'\n+    else:\n+        return python.get_default_version()\n+\n+\n def orig_py_exe(exe):  # pragma: no cover (platform specific)\n     \"\"\"A -mvenv virtualenv made from a -mvirtualenv virtualenv installs\n     packages to the incorrect location.  Attempt to find the _original_ exe\n@@ -43,6 +51,5 @@\n     cmd_output(orig_py_exe(python), '-mvenv', envdir, cwd='/')\n \n \n-get_default_version = python.get_default_version\n _interface = python.py_interface(ENVIRONMENT_DIR, make_venv)\n in_env, healthy, run_hook, install_environment = _interface\n", "issue": "python_venv language fails to use python3 interpreter and is using python2.7 instead\nApparently pre-commit failed to use python3 interpreter when I tried to add a hook and thus failed because venv module was not installed on default python2.7!\r\n\r\n```\r\n$ pre-commit try-repo ../python-license-check                                                                                                                                                                   [19:55:27]\r\n[INFO] Initializing environment for ../python-license-check.\r\n===============================================================================\r\nUsing config:\r\n===============================================================================\r\nrepos:\r\n-   repo: ../python-license-check\r\n    rev: 4048cf3844dbbf45690c153a7da7f532585ec87c\r\n    hooks:\r\n    -   id: liccheck\r\n===============================================================================\r\n[INFO] Installing environment for ../python-license-check.\r\n[INFO] Once installed this environment will be reused.\r\n[INFO] This may take a few minutes...\r\nAn unexpected error has occurred: CalledProcessError: Command: ('/Users/ssbarnea/.pyenv/versions/2.7.14/bin/python2.7', '-mvenv', '/var/folders/br/99tfdvcs3vvfwdk69z7f0xmc0000gn/T/tmpayl0P5/repoHa7_qe/py_venv-python2.7')\r\nReturn code: 1\r\nExpected return code: 0\r\nOutput: (none)\r\nErrors:\r\n    /Users/ssbarnea/.pyenv/versions/2.7.14/bin/python2.7: No module named venv\r\n\r\n\r\nCheck the log at /Users/ssbarnea/.cache/pre-commit/pre-commit.log\r\nFAIL: 1\r\nssbarnea@smac: ~/os/jira master \u26a1 $ cat ../python-license-check/.pre-commit-hooks.yaml                                                                                                                                                            [19:55:34]\r\n-   id: liccheck\r\n    name: Validates dependency licenses for Python packages\r\n    description: This validator validates a pre-commit hooks manifest file\r\n    entry: liccheck -s setup.cfg -r requirements.txt\r\n    language: python_venv\r\n```\r\n\r\nBased on the documentation I was expecting to see pre-commit using the `python3` executable for calling venv module. \n", "before_files": [{"content": "from __future__ import unicode_literals\n\nimport os.path\n\nfrom pre_commit.languages import python\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util import cmd_output\n\n\nENVIRONMENT_DIR = 'py_venv'\n\n\ndef orig_py_exe(exe):  # pragma: no cover (platform specific)\n    \"\"\"A -mvenv virtualenv made from a -mvirtualenv virtualenv installs\n    packages to the incorrect location.  Attempt to find the _original_ exe\n    and invoke `-mvenv` from there.\n\n    See:\n    - https://github.com/pre-commit/pre-commit/issues/755\n    - https://github.com/pypa/virtualenv/issues/1095\n    - https://bugs.python.org/issue30811\n    \"\"\"\n    try:\n        prefix_script = 'import sys; print(sys.real_prefix)'\n        _, prefix, _ = cmd_output(exe, '-c', prefix_script)\n        prefix = prefix.strip()\n    except CalledProcessError:\n        # not created from -mvirtualenv\n        return exe\n\n    if os.name == 'nt':\n        expected = os.path.join(prefix, 'python.exe')\n    else:\n        expected = os.path.join(prefix, 'bin', os.path.basename(exe))\n\n    if os.path.exists(expected):\n        return expected\n    else:\n        return exe\n\n\ndef make_venv(envdir, python):\n    cmd_output(orig_py_exe(python), '-mvenv', envdir, cwd='/')\n\n\nget_default_version = python.get_default_version\n_interface = python.py_interface(ENVIRONMENT_DIR, make_venv)\nin_env, healthy, run_hook, install_environment = _interface\n", "path": "pre_commit/languages/python_venv.py"}], "after_files": [{"content": "from __future__ import unicode_literals\n\nimport os.path\nimport sys\n\nfrom pre_commit.languages import python\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util import cmd_output\n\n\nENVIRONMENT_DIR = 'py_venv'\n\n\ndef get_default_version():  # pragma: no cover (version specific)\n    if sys.version_info < (3,):\n        return 'python3'\n    else:\n        return python.get_default_version()\n\n\ndef orig_py_exe(exe):  # pragma: no cover (platform specific)\n    \"\"\"A -mvenv virtualenv made from a -mvirtualenv virtualenv installs\n    packages to the incorrect location.  Attempt to find the _original_ exe\n    and invoke `-mvenv` from there.\n\n    See:\n    - https://github.com/pre-commit/pre-commit/issues/755\n    - https://github.com/pypa/virtualenv/issues/1095\n    - https://bugs.python.org/issue30811\n    \"\"\"\n    try:\n        prefix_script = 'import sys; print(sys.real_prefix)'\n        _, prefix, _ = cmd_output(exe, '-c', prefix_script)\n        prefix = prefix.strip()\n    except CalledProcessError:\n        # not created from -mvirtualenv\n        return exe\n\n    if os.name == 'nt':\n        expected = os.path.join(prefix, 'python.exe')\n    else:\n        expected = os.path.join(prefix, 'bin', os.path.basename(exe))\n\n    if os.path.exists(expected):\n        return expected\n    else:\n        return exe\n\n\ndef make_venv(envdir, python):\n    cmd_output(orig_py_exe(python), '-mvenv', envdir, cwd='/')\n\n\n_interface = python.py_interface(ENVIRONMENT_DIR, make_venv)\nin_env, healthy, run_hook, install_environment = _interface\n", "path": "pre_commit/languages/python_venv.py"}]}