Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 of 6 tasks
cjolowicz opened this issue Feb 18, 2020 · 21 comments · Fixed by #1648
Closed
3 of 6 tasks

Comments

@cjolowicz
Copy link
Contributor

cjolowicz commented Feb 18, 2020

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
@gaborbernat
Copy link
Contributor

Can you try deleting ~/Library/Application Support/virtualenv and run again, see if it happens?

@cjolowicz
Copy link
Contributor Author

cjolowicz commented Feb 18, 2020

I deleted ~/Library/Application Suppport/virtualenv and tried again.

Same end result:

$ ~/.local/pipx/venvs/nox/bin/python -m virtualenv -vvv --with-traceback \
   .../.nox/lint-3-8 -p python3.8
...
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.8'
Full command output
/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
98 setup logging to NOTSET [DEBUG report:43]
109 find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [INFO builtin:43]
109 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]
111 filesystem is not case-sensitive [DEBUG info:28]
112 Attempting to acquire lock 4393226576 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [DEBUG filelock:270]
112 Lock 4393226576 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [INFO filelock:274]
112 get interpreter info via cmd: /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
233 write PythonInfo to /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:87]
234 Attempting to release lock 4393226576 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [DEBUG filelock:315]
234 Lock 4393226576 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/3a643e9364d9383f9ff0e3a1bb5d658469a08952e9a15068254bf19cefd12f8b.lock [INFO filelock:318]
234 Attempting to acquire lock 4393197008 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [DEBUG filelock:270]
234 Lock 4393197008 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [INFO filelock:274]
234 get interpreter info via cmd: /usr/local/opt/python/bin/python3.7 -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
355 write PythonInfo to /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:87]
355 Attempting to release lock 4393197008 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [DEBUG filelock:315]
356 Lock 4393197008 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/df955ce39d0f31d56d4bb2fe0a613e5326ba60723fd33d8303a3aede8f65715c.lock [INFO filelock:318]
356 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]
356 discover PATH[0]=/Users/cjolowicz/.pyenv/shims [DEBUG builtin:76]
356 Attempting to acquire lock 4393313744 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [DEBUG filelock:270]
357 Lock 4393313744 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [INFO filelock:274]
357 get interpreter info via cmd: /Users/cjolowicz/.pyenv/shims/python3.8 -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
607 write PythonInfo to /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.json for /Users/cjolowicz/.pyenv/shims/python3.8 [DEBUG cached_py_info:87]
608 Attempting to release lock 4393313744 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [DEBUG filelock:315]
608 Lock 4393313744 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.lock [INFO filelock:318]
608 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': {'base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'installed_base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'abiflags': 'm', 'py_version_short': '3.7', 'platbase': '/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]
608 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]
609 Attempting to acquire lock 4393314000 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [DEBUG filelock:270]
609 Lock 4393314000 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [INFO filelock:274]
609 get interpreter info via cmd: /Users/cjolowicz/.pyenv/shims/python3 -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
867 write PythonInfo to /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.json for /Users/cjolowicz/.pyenv/shims/python3 [DEBUG cached_py_info:87]
869 Attempting to release lock 4393314000 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [DEBUG filelock:315]
869 Lock 4393314000 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/2c8b49a1ccc788f0781449740d8aa5d5c9fa78096c90fab18a0f13f0a0fd8bf6.lock [INFO filelock:318]
869 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': {'base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'installed_base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'abiflags': 'm', 'py_version_short': '3.7', 'platbase': '/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]
870 Attempting to acquire lock 4392356112 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [DEBUG filelock:270]
870 Lock 4392356112 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [INFO filelock:274]
870 get interpreter info via cmd: /Users/cjolowicz/.pyenv/shims/python -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
1106 write PythonInfo to /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.json for /Users/cjolowicz/.pyenv/shims/python [DEBUG cached_py_info:87]
1107 Attempting to release lock 4392356112 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [DEBUG filelock:315]
1107 Lock 4392356112 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/ee32c7b4ab1a595224882dca49769786672cbbc8b1af3b55884257f37a2c8e07.lock [INFO filelock:318]
1108 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': {'base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'installed_base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'abiflags': 'm', 'py_version_short': '3.7', 'platbase': '/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]
1108 discover PATH[1]=/Users/cjolowicz/.pyenv/bin [DEBUG builtin:76]
1109 discover PATH[2]=/Users/cjolowicz/.poetry/bin [DEBUG builtin:76]
1109 discover PATH[3]=/Users/cjolowicz/.local/bin [DEBUG builtin:76]
1110 discover PATH[4]=/Users/cjolowicz/.nvm/versions/node/v11.14.0/bin [DEBUG builtin:76]
1111 discover PATH[5]=/usr/local/opt/sqlite/bin [DEBUG builtin:76]
1111 discover PATH[6]=/usr/local/opt/python/libexec/bin [DEBUG builtin:76]
1113 Attempting to acquire lock 4393307856 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [DEBUG filelock:270]
1114 Lock 4393307856 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [INFO filelock:274]
1114 get interpreter info via cmd: /usr/local/opt/python/libexec/bin/python -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
1211 write PythonInfo to /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:87]
1211 Attempting to release lock 4393307856 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [DEBUG filelock:315]
1211 Lock 4393307856 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/a8e73444cd85779debfbed2ff850992c15fb63378866812fd7bb614c3cbdab4a.lock [INFO filelock:318]
1212 discover PATH[7]=/usr/local/opt/make/libexec/gnubin [DEBUG builtin:76]
1212 discover PATH[8]=/usr/local/opt/grep/libexec/gnubin [DEBUG builtin:76]
1212 discover PATH[9]=/usr/local/opt/gnu-tar/libexec/gnubin [DEBUG builtin:76]
1212 discover PATH[10]=/usr/local/opt/gnu-sed/libexec/gnubin [DEBUG builtin:76]
1212 discover PATH[11]=/usr/local/opt/findutils/libexec/gnubin [DEBUG builtin:76]
1212 discover PATH[12]=/usr/local/opt/coreutils/libexec/gnubin [DEBUG builtin:76]
1213 discover PATH[13]=/usr/local/bin [DEBUG builtin:76]
1213 Attempting to acquire lock 4393331600 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [DEBUG filelock:270]
1213 Lock 4393331600 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [INFO filelock:274]
1213 get interpreter info via cmd: /usr/local/bin/python3 -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
1313 write PythonInfo to /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.json for /usr/local/bin/python3 [DEBUG cached_py_info:87]
1314 Attempting to release lock 4393331600 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [DEBUG filelock:315]
1314 Lock 4393331600 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49.lock [INFO filelock:318]
1314 Attempting to acquire lock 4393374672 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [DEBUG filelock:270]
1314 Lock 4393374672 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [INFO filelock:274]
1314 get interpreter info via cmd: /usr/local/bin/python -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
1401 write PythonInfo to /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.json for /usr/local/bin/python [DEBUG cached_py_info:87]
1403 Attempting to release lock 4393374672 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [DEBUG filelock:315]
1403 Lock 4393374672 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [INFO filelock:318]
1403 Attempting to acquire lock 4393375056 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [DEBUG filelock:270]
1403 Lock 4393375056 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [INFO filelock:274]
1404 get interpreter info via cmd: /usr/local/opt/python@2/bin/python2.7 -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
1487 write PythonInfo to /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:87]
1488 Attempting to release lock 4393375056 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [DEBUG filelock:315]
1488 Lock 4393375056 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/9f8db13761904f9a05eb54cadd7876dec043b4411add2dfc35f9ba54388f47e8.lock [INFO filelock:318]
1488 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]
1489 discover PATH[14]=/usr/bin [DEBUG builtin:76]
1489 Attempting to acquire lock 4393376592 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [DEBUG filelock:270]
1489 Lock 4393376592 acquired on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [INFO filelock:274]
1489 get interpreter info via cmd: /usr/bin/python -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:106]
1587 write PythonInfo to /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.json for /usr/bin/python [DEBUG cached_py_info:87]
1588 Attempting to release lock 4393376592 on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [DEBUG filelock:315]
1588 Lock 4393376592 released on /Users/cjolowicz/Library/Application Support/virtualenv/py-info/20.0.4/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [INFO filelock:318]
1588 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]
1588 discover PATH[15]=/bin [DEBUG builtin:76]
1588 discover PATH[16]=/usr/sbin [DEBUG builtin:76]
1588 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'

This time the verbose output shows how the data is generated:

~/.pyenv/shims/python3.8 -s ~/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py

The resulting JSON file with the PythonInfo for the pyenv shim looks okay to me though:

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": "",
      "base": "/Users/cjolowicz/.local/pipx/venvs/nox",
      "installed_base": "/Users/cjolowicz/.pyenv/versions/3.8.1",
      "platbase": "/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
  }
}

But instead of proposing PythonInfo matching the 3.8.1 spec, it goes on to "discover exe cache" and then proposes PythonInfo with CPython 3.7.6 spec (but strangely with the 3.8.1 pyenv shim as the exe):

608 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': {'base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'installed_base': '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7', 'abiflags': 'm', 'py_version_short': '3.7', 'platbase': '/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]
608 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]

@gaborbernat
Copy link
Contributor

Can't understand easily what's wrong here, would you be available for some remote debugging in the following days? 😃

@cjolowicz
Copy link
Contributor Author

Unfortunately, for the next week or so it'll be difficult to schedule a time (but thanks :)).

What I have been able to find out so far is the following:

  1. The PythonInfo for ~/.pyenv/shims/python3.8 points to the Python in the pipx environment for Nox as the system_executable:
    "system_executable": "/Users/cjolowicz/.local/pipx/venvs/nox/bin/python",
  2. The system executable is a symlink pointing to the Homebrew Python3 executable at /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7, via multiple levels of symlinks.
  3. PythonInfo.from_exe throws away the PythonInfo originally generated and written to the cache (which correctly identifies the Python interpreter as 3.8.1), and instead returns the PythonInfo of the system_executable.
     def from_exe(cls, exe, raise_on_error=True, ignore_cache=False, resolve_to_host=True):
         ...
         proposed = proposed._resolve_to_system(proposed)
     def _resolve_to_system(cls, target):
         start_executable = target.executable
         ...
         if target.executable != target.system_executable:
             target = cls.from_exe(target.system_executable)
         target.executable = start_executable
         return target
  4. This causes virtualenv to report PythonInfo 3.7.6 instead of the correct 3.8.1.

@gaborbernat
Copy link
Contributor

Wait what you're describing is that nox is running with the python 3.8 binary, but links to 3.7.6 on system level. We have a section describing this within our readme, see the warning, https://virtualenv.pypa.io/en/latest/user_guide.html#python-discovery. we'll always use the system executable when you pass a python path, not the underlying pythons path. How did pipx created a python 3.8 env that references 3.7.6?

@cjolowicz
Copy link
Contributor Author

I'm not sure I understand.

Nox is not running with a Python 3.8 binary. Nox (and pipx) are running under Python 3.7.6 from Homebrew:

Tool Shebang
/usr/local/bin/pipx /usr/local/opt/python/bin/python3.7
/Users/cjolowicz/.local/pipx/venvs/nox/bin/nox /usr/local/opt/python/bin/python3.7

The path in the shebang (/usr/local/opt/python/bin/python3.7) is a symlink to /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7.

The Python interpreter in Nox's virtualenv (~/.local/pipx/venvs/nox/bin/python) is a symlink to the same location.

This is also the Python interpreter used by Nox when invoking virtualenv.

So Python 3.8 should only come into play when virtualenv searches the PATH.

@gaborbernat
Copy link
Contributor

I guess the error here comes why does the python 3.8 shim says the system executable is noxs. We will need to debug the system executable detection algorithm within py info to find the answer. If you have some time throw a debugger at it and see what goes wrong, you may call py info file directly for this.

@cjolowicz
Copy link
Contributor Author

Everything works just fine if I install Nox with pip instead of pipx, by the way.

@cjolowicz
Copy link
Contributor Author

Ok will try this.

@cjolowicz
Copy link
Contributor Author

When run on its own, the py_info script produces the expected result:

$ /Users/cjolowicz/.pyenv/shims/python3.8 -s /Users/cjolowicz/.local/pipx/venvs/nox/lib/python3.7/site-packages/virtualenv/discovery/py_info.py|grep system_executable
  "system_executable": "/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3.8",

But when run as a subprocess from virtualenv, we get the wrong system_executable:

$ ~/.local/pipx/venvs/nox/bin/python -m virtualenv /tmp/venv -p python3.8
$ grep system_executable ~/Library/Application\ Support/virtualenv/py-info/20.0.4/899ac50ce9bd2b17f79c71bdfa3e3c53264c3169cd7266b4352c162e4813ab33.json
    "system_executable": "/Users/cjolowicz/.local/pipx/venvs/nox/bin/python",

For some strange reason, in the subprocess running .pyenv/shims/python3.8, sys._base_executable is set to /Users/cjolowicz/.local/pipx/venvs/nox/bin/python (i.e. the symlink to Homebrew's Python3.7).

base_executable = getattr(sys, "_base_executable", None) # some platforms may set this to help us
if base_executable is not None: # use the saved system executable if present
if sys.executable != base_executable: # we know we're in a virtual environment, cannot be us
return base_executable

Details: output of some debug statements I added to virtualenv. Using PDB was tricky as the interesting stuff happens in the subprocess, and PDB seemed to break the communication between parent and child.
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=============================================================
executable=/usr/local/opt/python/bin/python3.7
prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/usr/local/opt/python/bin/python3.7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=============================================================
executable=/usr/local/opt/python/bin/python3.7
prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/usr/local/opt/python/bin/python3.7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/Users/cjolowicz/.pyenv/shims/python3.8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=============================================================
executable=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3.8
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/Users/cjolowicz/.pyenv/versions/3.8.1
sys.executable=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3.8
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
REPORT base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
WARN exe=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3.8 sysexe=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/Users/cjolowicz/.pyenv/shims/python3.8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/Users/cjolowicz/.pyenv/shims/python3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=============================================================
executable=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/Users/cjolowicz/.pyenv/versions/3.8.1
sys.executable=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
REPORT base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
WARN exe=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3 sysexe=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/Users/cjolowicz/.pyenv/shims/python3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/Users/cjolowicz/.pyenv/shims/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=============================================================
executable=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/Users/cjolowicz/.pyenv/versions/3.8.1
sys.executable=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
REPORT base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
WARN exe=/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python sysexe=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/Users/cjolowicz/.pyenv/shims/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/usr/local/opt/python/libexec/bin/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=============================================================
executable=/usr/local/opt/python/bin/python3.7
prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/usr/local/opt/python/libexec/bin/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/usr/local/bin/python3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=============================================================
executable=/usr/local/opt/python/bin/python3.7
prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
=============================================================
executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
prefix=/Users/cjolowicz/.local/pipx/venvs/nox
real_prefix=None
base_prefix=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7
sys.executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python
base_executable=/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/usr/local/bin/python3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/usr/local/bin/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/usr/local/bin/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBPROCESS exe=/usr/bin/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
END SUBPROCESS exe=/usr/bin/python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@cjolowicz
Copy link
Contributor Author

If I read the code correctly, sys._base_executable overrides how Python interpreters are identified, when we are running inside a virtual environment:

self.system_executable = self._fast_get_system_executable() # the executable we are based of (if available)

def _fast_get_system_executable(self):
"""Try to get the system executable by just looking at properties"""
if self.real_prefix or (
self.base_prefix is not None and self.base_prefix != self.prefix
): # if this is a virtual environment
if self.real_prefix is None:
base_executable = getattr(sys, "_base_executable", None) # some platforms may set this to help us
if base_executable is not None: # use the saved system executable if present
if sys.executable != base_executable: # we know we're in a virtual environment, cannot be us
return base_executable
return None # in this case we just can't tell easily without poking around FS and calling them, bail
# if we're not in a virtual environment, this is already a system python, so return the original executable
# note we must choose the original and not the pure executable as shim scripts might throw us off
return self.original_executable

@classmethod
def from_exe(cls, exe, raise_on_error=True, ignore_cache=False, resolve_to_host=True):
"""Given a path to an executable get the python information"""
# this method is not used by itself, so here and called functions can import stuff locally
from virtualenv.discovery.cached_py_info import from_exe
proposed = from_exe(cls, exe, raise_on_error=raise_on_error, ignore_cache=ignore_cache)
# noinspection PyProtectedMember
if isinstance(proposed, PythonInfo) and resolve_to_host:
proposed = proposed._resolve_to_system(proposed)
return proposed

@classmethod
def _resolve_to_system(cls, target):
start_executable = target.executable
prefixes = OrderedDict()
while target.system_executable is None:
prefix = target.real_prefix or target.base_prefix or target.prefix
if prefix in prefixes:
for at, (p, t) in enumerate(prefixes.items(), start=1):
logging.error("%d: prefix=%s, info=%r", at, p, t)
logging.error("%d: prefix=%s, info=%r", len(prefixes) + 1, prefix, target)
raise RuntimeError("prefixes are causing a circle {}".format("|".join(prefixes.keys())))
prefixes[prefix] = target
target = target.discover_exe(prefix=prefix, exact=False)
if target.executable != target.system_executable:
target = cls.from_exe(target.system_executable)
target.executable = start_executable
return target

Unfortunately, sys._base_executable is present with its original value when another Python interpreter is spawned as a subprocess, i.e. with the same value as in the parent process.

Here is an example session:

# Python 3.8 (from pyenv) reports itself.
$ /Users/cjolowicz/.pyenv/shims/python3.8 -c "import sys; print(sys._base_executable)"                                                             
/Users/cjolowicz/.pyenv/versions/3.8.1/bin/python3.8

# Python 3.7 (from Homebrew inside pipx env) reports itself.
$ /Users/cjolowicz/.local/pipx/venvs/nox/bin/python -c "import sys; print(sys._base_executable)"
/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

# Python 3.8 (pyenv) as subprocess of Python 3.7 (Homebrew/pipx) reports the interpreter in the parent process.
$ /Users/cjolowicz/.local/pipx/venvs/nox/bin/python -c 'import subprocess; subprocess.run(["/Users/cjolowicz/.pyenv/shims/python3.8", "-c", "import sys; print(sys._base_executable)"])'
/Users/cjolowicz/.local/pipx/venvs/nox/bin/python

So if Nox was installed with pipx, and is therefore running from a virtual environment, every Python interpreter will be identified the same as the system version (or rather, the version pipx was installed with), no matter its actual version.

@cjolowicz
Copy link
Contributor Author

I guess there was still a missing link in the reasoning above.

Why does virtualenv think that the pyenv shim is run from inside a virtual environment? Only then would the logic with sys._base_executable be triggered.

The virtual environment is detected by comparing sys.prefix to sys.base_prefix. In the subprocess, sys.prefix is still determined by the parent process, while sys.base_prefix is determined by the child:

# sys.prefix in the subprocess comes from the parent.
$ /Users/cjolowicz/.local/pipx/venvs/nox/bin/python -c 'import subprocess; subprocess.run(["/Users/cjolowicz/.pyenv/shims/python3.8", "-c", "import sys; print(sys.prefix)"])'
/Users/cjolowicz/.local/pipx/venvs/nox

# sys.base_prefix in the subprocess comes from the child.
$ /Users/cjolowicz/.local/pipx/venvs/nox/bin/python -c 'import subprocess; subprocess.run(["/Users/cjolowicz/.pyenv/shims/python3.8", "-c", "import sys; print(sys.base_prefix)"])'
/Users/cjolowicz/.pyenv/versions/3.8.1

So virtualenv assumes that the pyenv shim is run from a virtual environment, and uses sys._base_executable to determine the real Python.

@cjolowicz
Copy link
Contributor Author

Looks like this is actually bpo22490. There is an open PR for this at python/cpython#9516.

We can work around this issue by removing __PYVENV_LAUNCHER__ from the environment before launching the subprocess: #1648

This is just the bare fix for now...

@gaborbernat
Copy link
Contributor

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

@Pithikos
Copy link

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'

@gaborbernat
Copy link
Contributor

Do you have python3.6 installed? Can you show output of virtualenv -p python3.6 .env?

@Pithikos
Copy link

Pithikos commented Jul 29, 2020

@gaborbernat the output is seen above. It's just RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.6', nothing else

I'm pretty certain python3.6 is installed since I can just run python3.6 and get the interpreter up (Python3.6.8)

$> which python3.6
/usr/bin/python3.6

Oh and I'm running Ubuntu 20.04 if that adds anything. It seems to work fine with python3.5 and python3.8.

@gaborbernat
Copy link
Contributor

the output is seen above. It

I need the mnore detailed version of it, with virtualenv -p python3.6 .env -vvv

@Pithikos
Copy link

$> cd /tmp
$> virtualenv -p python3.6 .env -vvv
34 setup logging to NOTSET [DEBUG report:43]
54 find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=6) [INFO builtin:43]
54 proposed PythonInfo(spec=CPython3.8.2.final.0-64, exe=/usr/bin/python3, platform=linux, version='3.8.2 (default, Jul 16 2020, 14:00:26) \n[GCC 9.3.0]', encoding_fs_io=utf-8-utf-8) [INFO builtin:49]
54 discover PATH[0]=/usr/local/sbin [DEBUG builtin:76]
55 filesystem is case-sensitive [DEBUG info:28]
55 discover PATH[1]=/usr/local/bin [DEBUG builtin:76]
55 discover PATH[2]=/usr/sbin [DEBUG builtin:76]
56 discover PATH[3]=/usr/bin [DEBUG builtin:76]
56 Attempting to acquire lock 140537719809216 on /home/manos/.local/share/virtualenv/py-info/20.0.5/30295c5bec572e859485b1ffa5e89b8b3e2022ef6e3e739c1ac40f143a557caf.lock [DEBUG filelock:270]
56 Lock 140537719809216 acquired on /home/manos/.local/share/virtualenv/py-info/20.0.5/30295c5bec572e859485b1ffa5e89b8b3e2022ef6e3e739c1ac40f143a557caf.lock [INFO filelock:274]
56 get interpreter info via cmd: /usr/bin/python3.6 -s /home/manos/.local/lib/python3.8/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:110]
112 Attempting to release lock 140537719809216 on /home/manos/.local/share/virtualenv/py-info/20.0.5/30295c5bec572e859485b1ffa5e89b8b3e2022ef6e3e739c1ac40f143a557caf.lock [DEBUG filelock:315]
113 Lock 140537719809216 released on /home/manos/.local/share/virtualenv/py-info/20.0.5/30295c5bec572e859485b1ffa5e89b8b3e2022ef6e3e739c1ac40f143a557caf.lock [INFO filelock:318]
113 failed to query /usr/bin/python3.6 with code 1 err: 'Traceback (most recent call last):\n  File "/home/manos/.local/lib/python3.8/site-packages/virtualenv/discovery/py_info.py", line 16, in <module>\n    from distutils.command.install import SCHEME_KEYS\nModuleNotFoundError: No module named \'distutils.command\'\n' [INFO cached_py_info:38]
113 Attempting to acquire lock 140537719809504 on /home/manos/.local/share/virtualenv/py-info/20.0.5/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [DEBUG filelock:270]
113 Lock 140537719809504 acquired on /home/manos/.local/share/virtualenv/py-info/20.0.5/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [INFO filelock:274]
114 get PythonInfo from /home/manos/.local/share/virtualenv/py-info/20.0.5/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.json for /usr/bin/python [DEBUG cached_py_info:72]
114 Attempting to release lock 140537719809504 on /home/manos/.local/share/virtualenv/py-info/20.0.5/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [DEBUG filelock:315]
114 Lock 140537719809504 released on /home/manos/.local/share/virtualenv/py-info/20.0.5/767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90.lock [INFO filelock:318]
114 proposed PathPythonInfo(spec=CPython2.7.18.candidate.1-64, exe=/usr/bin/python, platform=linux2, version='2.7.18rc1 (default, Apr  7 2020, 12:05:55) \n[GCC 9.3.0]', encoding_fs_io=UTF-8-None) [INFO builtin:49]
115 discover PATH[4]=/sbin [DEBUG builtin:76]
115 discover PATH[5]=/bin [DEBUG builtin:76]
115 discover PATH[6]=/usr/games [DEBUG builtin:76]
115 discover PATH[7]=/usr/local/games [DEBUG builtin:76]
116 discover PATH[8]=/usr/lib/jvm/java-8-oracle/bin [DEBUG builtin:76]
116 discover PATH[9]=/usr/lib/jvm/java-8-oracle/jre/bin [DEBUG builtin:76]
116 discover PATH[10]=/home/manos/workspace/ubuntu-fresh-install/scripts [DEBUG builtin:76]
116 discover PATH[11]=/home/manos/.local/bin [DEBUG builtin:76]
116 discover PATH[12]=/home/manos/workspace/ubuntu-fresh-install/scripts [DEBUG builtin:76]
116 RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.6' [ERROR __main__:56]

@gaborbernat
Copy link
Contributor

@Pithikos for now you can work around the issue by installing https://packages.ubuntu.com/bionic/python3.6-distutils, however we should still operate under this behaviour for that created #1910, please feel free to submit a PR to fix it if you have time.

@pypa pypa locked as resolved and limited conversation to collaborators Jul 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants