Skip to content

fix(examples): fix Colab ModuleNotFoundError for in-kernel so101_nexu…#121

Merged
johnsutor merged 1 commit into
mainfrom
fix/colab-editable-install-sys-path
Jul 13, 2026
Merged

fix(examples): fix Colab ModuleNotFoundError for in-kernel so101_nexu…#121
johnsutor merged 1 commit into
mainfrom
fix/colab-editable-install-sys-path

Conversation

@johnsutor

@johnsutor johnsutor commented Jul 13, 2026

Copy link
Copy Markdown
Owner

…s imports

pip install -e registers the package via a .pth file that Python only reads at interpreter startup. The Colab kernel is already running when the install cell executes, so !python subprocess cells (fresh interpreters) pick up the editable install but in-kernel 'from examples.bc_ppo_warp import ...' cells do not, raising ModuleNotFoundError: No module named 'so101_nexus._reproducibility'.

The previous mitigation (pip uninstall + reinstall) blamed a stale wheel and did not address this. Insert src/ onto sys.path explicitly right after the install so in-kernel imports work without a runtime restart, and correct the markdown note explaining the failure.

…s imports

pip install -e registers the package via a .pth file that Python only
reads at interpreter startup. The Colab kernel is already running when
the install cell executes, so !python subprocess cells (fresh
interpreters) pick up the editable install but in-kernel
'from examples.bc_ppo_warp import ...' cells do not, raising
ModuleNotFoundError: No module named 'so101_nexus._reproducibility'.

The previous mitigation (pip uninstall + reinstall) blamed a stale
wheel and did not address this. Insert src/ onto sys.path explicitly
right after the install so in-kernel imports work without a runtime
restart, and correct the markdown note explaining the failure.
@johnsutor johnsutor merged commit e7f060f into main Jul 13, 2026
7 checks passed
@johnsutor johnsutor deleted the fix/colab-editable-install-sys-path branch July 13, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant