classification
Title: "subprocess not supported for isolated subinterpreters" when running venv
Type: behavior Stage: resolved
Components: Versions: Python 3.10
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin
Priority: normal Keywords:

Created on 2021-06-21 15:52 by brian.curtin, last changed 2021-06-21 17:19 by brian.curtin. This issue is now closed.

Messages (3)
msg396262 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2021-06-21 15:52
I'm currently trying to run my `tox` testing environment—all of which runs under `coverage`—against 3.10b3 and am running into some trouble. I initially thought it was something about tox or coverage, but it looks lower level than that as the venv script in the stdlib isn't working. I'm not actually sure if the direct problem I'm experiencing is the same as what I'm listing below, but it reproduces the same result:

$ python3.10 -m venv ~/.envs/test
Error: subprocess not supported for isolated subinterpreters

Here's the version I'm running: Python 3.10.0b3 (tags/v3.10.0b3:865714a117, Jun 17 2021, 17:37:28) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin


In case it's helpful, here's a full traceback from tox:

action: py310-unit, msg: getenv
cwd: /Users/briancurtin/elastic/cloud/python-services-v3
cmd: /Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/bin/python -m pip install coverage -rrequirements.txt -rtest-requirements.txt
Collecting coverage
  Using cached coverage-5.5.tar.gz (691 kB)
    ERROR: Error subprocess not supported for isolated subinterpreters while executing command python setup.py egg_info
ERROR: Exception:
Traceback (most recent call last):
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
    return func(self, options, args)
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 332, in run
    requirement_set = resolver.resolve(
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
    abstract_dist = _get_prepared_distribution(
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 40, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 550, in prepare_metadata
    self.metadata_directory = self._generate_metadata()
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 525, in _generate_metadata
    return generate_metadata_legacy(
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 70, in generate_metadata
    call_subprocess(
  File "/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/lib/python3.10/site-packages/pip/_internal/utils/subprocess.py", line 185, in call_subprocess
    proc = subprocess.Popen(
  File "/usr/local/lib/python3.10/subprocess.py", line 962, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.10/subprocess.py", line 1773, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
RuntimeError: subprocess not supported for isolated subinterpreters
WARNING: You are using pip version 20.1.1; however, version 21.1.2 is available.
You should consider upgrading via the '/Users/briancurtin/elastic/cloud/python-services-v3/.tox/py310-unit/bin/python -m pip install --upgrade pip' command.
msg396270 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2021-06-21 16:46
Hmm. I asked around about this and someone installed 3.10.0-beta3 via pyenv and this worked fine. 

For whatever it's worth, this was built from source on OS X 10.14.6 via a pretty normal setup of `./configure` with no extra flags and then `make install`
msg396274 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2021-06-21 17:19
I think there was either something stale that got linked wrong or some other kind of build failure, as I just built v3.10.0b3 tag again from a properly cleaned environment and this is no longer occurring. Sorry for the noise.
History
Date User Action Args
2021-06-21 17:19:53brian.curtinsetstatus: open -> closed

messages: + msg396274
stage: resolved
2021-06-21 16:46:16brian.curtinsetmessages: + msg396270
2021-06-21 15:52:57brian.curtincreate