我制作了一个开源的 Jupyter 替代品。
I made an open-source juypter alternative

原始链接: https://github.com/DannyMang/more-compute

## MoreCompute:本地交互式笔记本 MoreCompute 是一个 Python 笔记本环境,类似于 Marimo 和 Colab,设计为完全在本地运行。它使用带有 `%%` 单元格标记的 `.py` 笔记本,通过转换为 `.ipynb` 格式,与 Jupyter 和 Colab 等工具兼容。转换器会自动处理来自 `!pip install` 命令的依赖项。 **入门:** * **先决条件:** Node.js v20,Python 3.12。 * **安装:** 使用 `uv` 和 `pip`,或通过 Docker(有或没有 VS Code/Cursor 的 Dev Containers)。 * **使用方法:** `more-compute notebook.py` 打开现有笔记本,`more-compute new` 创建新笔记本。默认在 `http://localhost:2718` 运行。 **主要特性:** * 跨平台(macOS、Windows、Linux)。 * `.py` 和 `.ipynb` 格式之间的转换。 * 调试模式用于日志记录。 * 后端和前端的可配置端口。 该项目是开源的(MIT 许可证)并且正在积极开发中——计划添加更多功能。更多详细信息和仓库地址请访问 [https://github.com/DannyMang/MORECOMPUTE](https://github.com/DannyMang/MORECOMPUTE)。

一位开发者在Hacker News上宣布创建了一个Jupyter Notebook的开源替代品(github.com/dannymang)。该项目源于对Jupyter的不满以及使用Marimo的经验,特别是解决了诸如不活动限制和缺乏无缝Git集成的问题。 开发者还旨在简化管理和切换不同的云计算提供商以进行模型训练,甚至可能实现同时在多个提供商上进行训练。初步反应积极,其他用户表达了对Jupyter替代方案的兴趣以及对该项目潜力的兴奋。该公告引发了一场关于构建该工具的动机以及用户对寻找流行的notebook环境替代方案的兴趣的简短讨论。
相关文章

原文

PyPI Downloads

PyPI version Python 3.10+ License: MIT

An interactive Python notebook environment, similar to Marimo and Google Colab, that runs locally.

demo.mp4

Prerequisites:

  • Node.js v20 (see .nvmrc)
  • Python 3.12 (see .python-version)
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install more-compute

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
uv tool install more-compute
pip install more-compute

# Add to PATH if needed:
# macOS/Linux: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
# Windows: See troubleshooting below
more-compute notebook.py     # Open existing notebook
more-compute new             # Create new notebook
more-compute --debug         # Show logs

Opens automatically at http://localhost:2718

Converting Between Formats

MoreCompute uses .py notebooks with # %% cell markers, but you can convert to/from .ipynb:

From .ipynb to .py:

# Auto-detect output name (notebook.ipynb -> notebook.py)
more-compute convert notebook.ipynb

# Or specify output
more-compute convert notebook.ipynb -o my_notebook.py

# Then open in MoreCompute
more-compute my_notebook.py

The converter automatically extracts dependencies from !pip install commands and adds UV inline script metadata.

From .py to .ipynb:

# Auto-detect output name (notebook.py -> notebook.ipynb)
more-compute convert notebook.py

# Or specify output
more-compute convert notebook.py -o colab_notebook.ipynb

This makes your notebooks compatible with Google Colab, Jupyter, and other tools that require .ipynb format.

will add things here as things progress...

Works on Mac, Windows, and Linux with identical environments.

Prerequisites: Docker Desktop and VS Code/Cursor with the Dev Containers extension.

  1. Clone the repo and open in VS Code/Cursor
  2. Press Cmd/Ctrl + Shift + P → "Dev Containers: Reopen in Container"
  3. Wait for the container to build (first time takes a few minutes)
  4. Run more-compute new in the terminal

Option 2: Docker (No IDE Required)

# Build the image
docker build -t morecompute .

# Run with your notebooks mounted
docker run -p 3141:3141 -p 2718:2718 -v $(pwd):/notebooks morecompute

Prerequisites:

  • Python 3.12 (install via pyenv: pyenv install 3.12)
  • Node.js 20 (install via nvm: nvm install 20)
# Clone and enter directory
git clone https://github.com/DannyMang/MORECOMPUTE.git
cd MORECOMPUTE

# Use pinned versions
pyenv local 3.12  # or: pyenv install 3.12 && pyenv local 3.12
nvm use           # reads .nvmrc automatically

# Create virtual environment and install
uv venv && source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install -e .

# Install frontend dependencies
cd frontend && npm ci && cd ..  # npm ci uses package-lock.json for exact versions

# Run
more-compute notebook.py
Variable Default Description
MORECOMPUTE_PORT 3141 Backend API port
MORECOMPUTE_FRONTEND_PORT 2718 Frontend UI port

MIT - see LICENSE

联系我们 contact @ memedata.com