#34964·scikit-learn

I cannot get the scikit-learn development Codespace into the intended development environment.

Author: Adityaa-KCCreated Sep 15, 2026Updated Sep 17, 2026

Introduce yourself

I am very new in this field of open source. One day a thing clicked into my mind that we should contribute to the open source and for this i forked SK learn library. But due to the restrictions of my hardware i tried to open it in "CODESPACE". But when i initialized the codespace every time it failed and showed a message that the codespace is opened in Recovery mode.

Describe the bug and give evidence about its user-facing impact

When creating a GitHub Codespace from a fork of scikit-learn, the Codespace enters recovery mode instead of starting the intended development environment.

The terminal reports:

"This codespace is currently running in recovery mode due to a container error."

The issue prevents me from obtaining the normal scikit-learn development environment in Codespaces.

I observed this consistently when creating a fresh Codespace from my fork. The repository's .devcontainer/devcontainer.json runs .devcontainer/setup.sh as its onCreateCommand, and the setup script uses micromamba activate sklearn-dev.

The attached screenshots/logs show the recovery-mode error and the Codespaces creation log.

Steps/Code to Reproduce

  1. Fork the scikit-learn/scikit-learn repository.
  2. Keep the fork on the main branch.
  3. Open the fork and create a new GitHub Codespace from the repository.
  4. Wait for the Codespace to finish creating.
  5. The Codespace opens in recovery mode and displays the message: This codespace is currently running in recovery mode due to a container error.
  6. Open the terminal and observe the recovery-mode message.

The repository's .devcontainer/devcontainer.json specifies:

"onCreateCommand": ".devcontainer/setup.sh"

The setup script subsequently runs:
micromamba activate sklearn-dev

which is where the Shell not initialized error occurs in my reproduction.

### Expected Results

The Codespace should be created successfully and open in the normal scikit-learn development environment, with the `sklearn-dev` micromamba environment configured and activated as intended.

### Actual Results

The Codespace enters recovery mode instead of starting the intended scikit-learn development environment.

The terminal displays:
This codespace is currently running in recovery mode due to a container error.

<img width="901" height="314" alt="Image" src="https://github.com/user-attachments/assets/66e24ae1-dbf7-43c3-9230-2254ae65f5d5" />

<img width="1594" height="744" alt="Image" src="https://github.com/user-attachments/assets/ca06856e-4476-4364-a626-3b7bebed9477" />


### Versions

```shell
### Versions

- Python: 3.12.14
- OS: Alpine Linux 3.23.5
- scikit-learn commit: `0f1488a12daacc54893bcb43d1fc2738ca0ad222`

Interest in fixing the bug

Yes, I would be interested in working on this issue.

Source: scikit-learn/scikit-learn