RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.8'

See original GitHub issue

Nox does not find Python 3.8.1, even though it is present via pyenv local.

nox -s lint-3.8
nox > Running session lint-3.8
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/lint-3-8
nox > Command /Users/cjolowicz/.local/pipx/venvs/nox/bin/python -m virtualenv /Users/cjolowicz/Code/github.com/cjolowicz/poetry-merge-lock/.nox/lint-3-8 -p python3.8 failed with exit code 1:
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.8'
nox > Session lint-3.8 failed.

Setup:

  • macOS
  • Nox was installed via pipx.
  • The system Python (3.7.6) was installed via Homebrew.

In the verbose output, the following line looks suspicious:

122 proposed PythonInfo(spec=CPython3.7.6.final.0-64, system=/usr/local/opt/python/bin/python3.7, exe=/Users/cjolowicz/.pyenv/shims/python3.8, platform=darwin, version='3.7.6 (default, Dec 30 2019, 19:38:28) \n[Clang 11.0.0 (clang-1100.0.33.16)]', encoding_fs_io=utf-8-UTF-8) [INFO builtin:49]
Verbose output with traceback
/Users/cjolowicz/.local/pipx/venvs/nox/bin/python -m virtualenv -vvv --with-traceback /Users/cjolowicz/Code/github.com/cjolowicz/poetry-merge-lock/.nox/lint-3-8 -p python3.8
95 setup logging to NOTSET [DEBUG report:43]
102 find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [INFO builtin:43]
103 discover system for PythonInfo(spec=CPython3.7.6.final.0-64, exe=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python, platform=darwin, version='3.7.6 (default, Dec 30 2019, 19:38:28) \n[Clang 11.0.0 (clang-1100.0.33.16)]', encoding_fs_io=utf-8-UTF-8) in /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7 [DEBUG py_info:335]
105 filesystem is not case-sensitive [DEBUG info:28]
106 Attempting to acquire lock 4499641872 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [DEBUG filelock:270]
107 Lock 4499641872 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [INFO filelock:274]
110 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.json for /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7 [DEBUG cached_py_info:72]
113 Attempting to release lock 4499641872 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [DEBUG filelock:315]
113 Lock 4499641872 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [INFO filelock:318]
114 Attempting to acquire lock 4499606096 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [DEBUG filelock:270]
115 Lock 4499606096 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [INFO filelock:274]
116 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.json for /usr/local/opt/python/bin/python3.7 [DEBUG cached_py_info:72]
118 Attempting to release lock 4499606096 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [DEBUG filelock:315]
118 Lock 4499606096 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [INFO filelock:318]
118 proposed PythonInfo(spec=CPython3.7.6.final.0-64, system=/usr/local/opt/python/bin/python3.7, exe=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python, platform=darwin, version='3.7.6 (default, Dec 30 2019, 19:38:28) \n[Clang 11.0.0 (clang-1100.0.33.16)]', encoding_fs_io=utf-8-UTF-8) [INFO builtin:49]
119 discover PATH[0]=/Users/cjolowicz/.pyenv/shims [DEBUG builtin:76]
119 Attempting to acquire lock 4499720848 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [DEBUG filelock:270]
120 Lock 4499720848 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [INFO filelock:274]
120 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.json for /Users/cjolowicz/.pyenv/shims/python3.8 [DEBUG cached_py_info:72]
122 Attempting to release lock 4499720848 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [DEBUG filelock:315]
122 Lock 4499720848 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [INFO filelock:318]
122 discover exe cache ('/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', False) via PythonInfo({'platform': 'darwin', 'implementation': 'CPython', 'version_info': VersionInfo(major=3, minor=7, micro=6, releaselevel='final', serial=0), 'architecture': 64, 'version': '3.7.6 (default, Dec 30 2019, 19:38:28) \n[Clang 11.0.0 (clang-1100.0.33.16)]', 'os': 'posix', 'prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'base_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'real_prefix': None, 'base_exec_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'exec_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'executable': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7', 'original_executable': '/usr/local/opt/python/bin/python3.7', 'system_executable': '/usr/local/opt/python/bin/python3.7', 'has_venv': True, 'path': ['/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages'], 'file_system_encoding': 'utf-8', 'stdout_encoding': 'UTF-8', 'sysconfig_paths': {'stdlib': '{installed_base}/lib/python{py_version_short}', 'platstdlib': '{platbase}/lib/python{py_version_short}', 'purelib': '{base}/lib/python{py_version_short}/site-packages', 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', 'scripts': '{base}/bin', 'data': '{base}'}, 'sysconfig_vars': {'py_version_short': '3.7', 'base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'platbase': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'abiflags': 'm', 'installed_base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'}, 'distutils_install': {'purelib': 'lib/python3.7/site-packages', 'platlib': 'lib/python3.7/site-packages', 'headers': 'include/python3.7m/UNKNOWN', 'scripts': 'bin', 'data': ''}, 'system_stdlib': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7'}) [DEBUG py_info:333]
122 proposed PythonInfo(spec=CPython3.7.6.final.0-64, system=/usr/local/opt/python/bin/python3.7, exe=/Users/cjolowicz/.pyenv/shims/python3.8, platform=darwin, version='3.7.6 (default, Dec 30 2019, 19:38:28) \n[Clang 11.0.0 (clang-1100.0.33.16)]', encoding_fs_io=utf-8-UTF-8) [INFO builtin:49]
123 Attempting to acquire lock 4499721936 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [DEBUG filelock:270]
123 Lock 4499721936 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [INFO filelock:274]
123 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.json for /Users/cjolowicz/.pyenv/shims/python3 [DEBUG cached_py_info:72]
125 Attempting to release lock 4499721936 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [DEBUG filelock:315]
125 Lock 4499721936 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [INFO filelock:318]
125 discover exe cache ('/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', False) via PythonInfo({'platform': 'darwin', 'implementation': 'CPython', 'version_info': VersionInfo(major=3, minor=7, micro=6, releaselevel='final', serial=0), 'architecture': 64, 'version': '3.7.6 (default, Dec 30 2019, 19:38:28) \n[Clang 11.0.0 (clang-1100.0.33.16)]', 'os': 'posix', 'prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'base_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'real_prefix': None, 'base_exec_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'exec_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'executable': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7', 'original_executable': '/usr/local/opt/python/bin/python3.7', 'system_executable': '/usr/local/opt/python/bin/python3.7', 'has_venv': True, 'path': ['/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages'], 'file_system_encoding': 'utf-8', 'stdout_encoding': 'UTF-8', 'sysconfig_paths': {'stdlib': '{installed_base}/lib/python{py_version_short}', 'platstdlib': '{platbase}/lib/python{py_version_short}', 'purelib': '{base}/lib/python{py_version_short}/site-packages', 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', 'scripts': '{base}/bin', 'data': '{base}'}, 'sysconfig_vars': {'py_version_short': '3.7', 'base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'platbase': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'abiflags': 'm', 'installed_base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'}, 'distutils_install': {'purelib': 'lib/python3.7/site-packages', 'platlib': 'lib/python3.7/site-packages', 'headers': 'include/python3.7m/UNKNOWN', 'scripts': 'bin', 'data': ''}, 'system_stdlib': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7'}) [DEBUG py_info:333]
125 Attempting to acquire lock 4498790928 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [DEBUG filelock:270]
126 Lock 4498790928 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [INFO filelock:274]
126 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.json for /Users/cjolowicz/.pyenv/shims/python [DEBUG cached_py_info:72]
128 Attempting to release lock 4498790928 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [DEBUG filelock:315]
128 Lock 4498790928 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [INFO filelock:318]
128 discover exe cache ('/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', False) via PythonInfo({'platform': 'darwin', 'implementation': 'CPython', 'version_info': VersionInfo(major=3, minor=7, micro=6, releaselevel='final', serial=0), 'architecture': 64, 'version': '3.7.6 (default, Dec 30 2019, 19:38:28) \n[Clang 11.0.0 (clang-1100.0.33.16)]', 'os': 'posix', 'prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'base_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'real_prefix': None, 'base_exec_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'exec_prefix': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'executable': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7', 'original_executable': '/usr/local/opt/python/bin/python3.7', 'system_executable': '/usr/local/opt/python/bin/python3.7', 'has_venv': True, 'path': ['/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages'], 'file_system_encoding': 'utf-8', 'stdout_encoding': 'UTF-8', 'sysconfig_paths': {'stdlib': '{installed_base}/lib/python{py_version_short}', 'platstdlib': '{platbase}/lib/python{py_version_short}', 'purelib': '{base}/lib/python{py_version_short}/site-packages', 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', 'scripts': '{base}/bin', 'data': '{base}'}, 'sysconfig_vars': {'py_version_short': '3.7', 'base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'platbase': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'abiflags': 'm', 'installed_base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'}, 'distutils_install': {'purelib': 'lib/python3.7/site-packages', 'platlib': 'lib/python3.7/site-packages', 'headers': 'include/python3.7m/UNKNOWN', 'scripts': 'bin', 'data': ''}, 'system_stdlib': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7'}) [DEBUG py_info:333]
128 discover PATH[1]=/Users/cjolowicz/.pyenv/bin [DEBUG builtin:76]
128 discover PATH[2]=/Users/cjolowicz/.poetry/bin [DEBUG builtin:76]
128 discover PATH[3]=/Users/cjolowicz/.local/bin [DEBUG builtin:76]
129 discover PATH[4]=/Users/cjolowicz/.nvm/versions/node/v11.14.0/bin [DEBUG builtin:76]
129 discover PATH[5]=/usr/local/opt/sqlite/bin [DEBUG builtin:76]
129 discover PATH[6]=/usr/local/opt/python/libexec/bin [DEBUG builtin:76]
129 Attempting to acquire lock 4498790736 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [DEBUG filelock:270]
130 Lock 4498790736 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [INFO filelock:274]
130 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.json for /usr/local/opt/python/libexec/bin/python [DEBUG cached_py_info:72]
131 Attempting to release lock 4498790736 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [DEBUG filelock:315]
131 Lock 4498790736 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [INFO filelock:318]
131 discover PATH[7]=/usr/local/opt/make/libexec/gnubin [DEBUG builtin:76]
131 discover PATH[8]=/usr/local/opt/grep/libexec/gnubin [DEBUG builtin:76]
132 discover PATH[9]=/usr/local/opt/gnu-tar/libexec/gnubin [DEBUG builtin:76]
132 discover PATH[10]=/usr/local/opt/gnu-sed/libexec/gnubin [DEBUG builtin:76]
132 discover PATH[11]=/usr/local/opt/findutils/libexec/gnubin [DEBUG builtin:76]
132 discover PATH[12]=/usr/local/opt/coreutils/libexec/gnubin [DEBUG builtin:76]
132 discover PATH[13]=/usr/local/bin [DEBUG builtin:76]
133 Attempting to acquire lock 4499771280 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [DEBUG filelock:270]
133 Lock 4499771280 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [INFO filelock:274]
133 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.json for /usr/local/bin/python3 [DEBUG cached_py_info:72]
134 Attempting to release lock 4499771280 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [DEBUG filelock:315]
135 Lock 4499771280 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [INFO filelock:318]
135 Attempting to acquire lock 4499784080 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [DEBUG filelock:270]
135 Lock 4499784080 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [INFO filelock:274]
136 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.json for /usr/local/bin/python [DEBUG cached_py_info:72]
137 Attempting to release lock 4499784080 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [DEBUG filelock:315]
137 Lock 4499784080 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [INFO filelock:318]
137 Attempting to acquire lock 4499742416 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [DEBUG filelock:270]
138 Lock 4499742416 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [INFO filelock:274]
138 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.json for /usr/local/opt/python@2/bin/python2.7 [DEBUG cached_py_info:72]
139 Attempting to release lock 4499742416 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [DEBUG filelock:315]
139 Lock 4499742416 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [INFO filelock:318]
139 proposed PathPythonInfo(spec=CPython2.7.17.final.0-64, system=/usr/local/opt/python@2/bin/python2.7, exe=/usr/local/bin/python, platform=darwin, version='2.7.17 (default, Dec 23 2019, 21:25:34) \n[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.16)]', encoding_fs_io=utf-8-None) [INFO builtin:49]
140 discover PATH[14]=/usr/bin [DEBUG builtin:76]
140 Attempting to acquire lock 4499719568 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [DEBUG filelock:270]
141 Lock 4499719568 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [INFO filelock:274]
143 get PythonInfo from /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.json for /usr/bin/python [DEBUG cached_py_info:72]
146 Attempting to release lock 4499719568 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [DEBUG filelock:315]
146 Lock 4499719568 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [INFO filelock:318]
146 proposed PathPythonInfo(spec=CPython2.7.16.final.0-64, exe=/usr/bin/python, platform=darwin, version='2.7.16 (default, Oct 16 2019, 00:34:56) \n[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)]', encoding_fs_io=utf-8-None) [INFO builtin:49]
146 discover PATH[15]=/bin [DEBUG builtin:76]
146 discover PATH[16]=/usr/sbin [DEBUG builtin:76]
146 discover PATH[17]=/sbin [DEBUG builtin:76]
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/__main__.py", line 47, in <module>
    run_with_catch()
  File "/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/__main__.py", line 36, in run_with_catch
    run(args, options)
  File "/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/__main__.py", line 19, in run
    session = cli_run(args, options)
  File "/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/run/__init__.py", line 22, in cli_run
    session = session_via_cli(args, options)
  File "/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/run/__init__.py", line 29, in session_via_cli
    parser = build_parser(args, options)
  File "/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/run/__init__.py", line 51, in build_parser
    raise RuntimeError("failed to find interpreter for {}".format(discover))
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.8'
Contents of ~/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.json
{
  "st_mtime": 1571213231.6117532,
  "path": "/Users/cjolowicz/.pyenv/shims/python3.8",
  "content": {
    "platform": "darwin",
    "implementation": "CPython",
    "version_info": {
      "major": 3,
      "minor": 8,
      "micro": 1,
      "releaselevel": "final",
      "serial": 0
    },
    "architecture": 64,
    "version": "3.8.1 (default, Dec 19 2019, 17:17:20) \n[Clang 11.0.0 (clang-1100.0.20.17)]",
    "os": "posix",
    "prefix": "/Users/cjolowicz/.local/pipx/venvs/nox",
    "base_prefix": "/Users/cjolowicz/.pyenv/versions/3.8.1",
    "real_prefix": null,
    "base_exec_prefix": "/Users/cjolowicz/.pyenv/versions/3.8.1",
    "exec_prefix": "/Users/cjolowicz/.local/pipx/venvs/nox",
    "executable": "/Users/cjolowicz/.pyenv/shims/python3.8",
    "original_executable": "/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3.8",
    "system_executable": "/Users/cjolowicz/.local/pipx/venvs/nox/bin/python",
    "has_venv": true,
    "path": [
      "/Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery",
      "/Users/cjolowicz/.pyenv/versions/3.8.1/lib/python38.zip",
      "/Users/cjolowicz/.pyenv/versions/3.8.1/lib/python3.8",
      "/Users/cjolowicz/.pyenv/versions/3.8.1/lib/python3.8/lib-dynload"
    ],
    "file_system_encoding": "utf-8",
    "stdout_encoding": "utf-8",
    "sysconfig_paths": {
      "stdlib": "{installed_base}/lib/python{py_version_short}",
      "platstdlib": "{platbase}/lib/python{py_version_short}",
      "purelib": "{base}/lib/python{py_version_short}/site-packages",
      "platlib": "{platbase}/lib/python{py_version_short}/site-packages",
      "include": "{installed_base}/include/python{py_version_short}{abiflags}",
      "scripts": "{base}/bin",
      "data": "{base}"
    },
    "sysconfig_vars": {
      "abiflags": "",
      "platbase": "/Users/cjolowicz/.local/pipx/venvs/nox",
      "installed_base": "/Users/cjolowicz/.pyenv/versions/3.8.1",
      "base": "/Users/cjolowicz/.local/pipx/venvs/nox",
      "py_version_short": "3.8"
    },
    "distutils_install": {
      "purelib": "lib/python3.8/site-packages",
      "platlib": "lib/python3.8/site-packages",
      "headers": "include/python3.8/UNKNOWN",
      "scripts": "bin",
      "data": ""
    },
    "system_stdlib": "/Users/cjolowicz/.pyenv/versions/3.8.1/lib/python3.8",
    "_creators": null
  }
}
Output of pip list

/Users/cjolowicz/.local/pipx/venvs/nox/bin/python -m pip list 203ms  11:33 Package Version


appdirs 1.4.3 argcomplete 1.11.1 colorlog 4.1.0 distlib 0.3.0 filelock 3.0.12 importlib-metadata 1.5.0 nox 2019.11.9 pip 20.0.2 py 1.8.1 setuptools 41.2.0 six 1.14.0 virtualenv 20.0.4 zipp 3.0.0

I have not been able to create a repro in Docker, possibly macOS-specific.


Thanks for submitting an issue!

If submitting a BUG please provide:

  • Minimal reproducible example or detailed descriptions
  • the output of the virtual environment creation with the -vvv --with-traceback flags included
  • pip list of the environment where virtualenv is installed into if not using the zipapp

if submitting an ENHANCEMENT issue:

  • a clear problem statement with an example
  • suggested change with example
  • if you have want help to do a PR yourself

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
Pithikoscommented, Jul 29, 2020

This still does not work on virtualenv 20.0.28 for me

$> virtualenv --version
virtualenv 20.0.28 from /home/manos/.local/lib/python3.8/site-packages/virtualenv/__init__.py
$> virtualenv -p python3.6 .env
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.6'

Unfortunately even downgrading to 20.0.5 does not seem to work

$> pip3 install virtualenv==20.0.5
$> virtualenv --version
virtualenv 20.0.5 from /home/manos/.local/lib/python3.8/site-packages/virtualenv/__init__.py
$> virtualenv -p python3.6 .env
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.6'
1reaction
gaborbernatcommented, Feb 21, 2020

Hello, a fix for this issue has been released via virtualenv 20.0.5; see https://pypi.org/project/virtualenv/20.0.5/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-5-2020-02-21) . Please give a try and report back if your issue has not been addressed; if not, please comment here, and we’ll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release.

thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed to find interpreter for Builtin discover of python_spec ...
Over at tskit-dev/tskit#498 a user has reported this error: An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/python3', ...
Read more >
failed to find interpreter for Builtin discover of python_spec
I am trying to create a new virtual environment with a specific python version. ISSUE. When I type: python3 -m virtualenv --python="D:\ ...
Read more >
python-virtualenv-clone fails to build with Python 3.11
9' RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3. ... You can follow these instructions to test locally in ...
Read more >
Hynek Schlawack on Twitter: "To save someone the hour I've ...
... python3.9-distutils, otherwise you'll get a misleading `RuntimeError: failed to find interpreter for Builtin discover of python_spec='3.9'`" / Twitter ...
Read more >
failed to find interpreter for Builtin discover of python_spec="'C ...
How to Solve Error Message RuntimeError: failed to find interpreter for Builtin discover of python_spec. Actually, the error exist in the value ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found