posit-dev / posit-dev/positron

Conda Python runtimes fail with init_sys_streams: Bad file descriptor after launching Conda-based R runtime on macOS

Open
#13,656 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: kallichore area: runtimes bug lang: python lang: r support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Thanks for the report @ChenHingO!

The init_sys_streams ... Bad file descriptor error means Python's stdin/stdout/stderr aren't available when the process launches. I don't think we've seen this specific failure before so we'll need some more information to help us debug.

The fact that system Python 3.9 works but Conda 3.13/3.14 doesn't is interesting.

A few more things that would help:

  1. Have you used the same Conda envs successfully in another tool (VS Code, Jupyter, etc.)?
  2. Does the Conda env work in the terminal?
    conda activate dev
    python -c "import sys; print(sys.version); print(sys.executable)"
    
  3. How was Conda installed: Anaconda, Miniconda, Miniforge?
  4. If you can, please also run the Developer: Runtime Startup Diagnostics command from the Command Palette (Cmd+Shift+P), then copy the full output and share it here.

Originally posted by @seeM in #13580

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is identified in the issue. Start by checking the Conda environment in the terminal with the supplied Python command, compare it with other tools, and run Developer: Runtime Startup Diagnostics. The issue currently defines investigation and information gathering rather than a confirmed fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python, r
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.