Skip to content

docs: improve installation instructions with uv and pip setup - #293

Closed
erdemuysalx wants to merge 1 commit into
teng-lin:mainfrom
erdemuysalx:docs/improve-installation-docs
Closed

erdemuysalx wants to merge 1 commit into
teng-lin:mainfrom
erdemuysalx:docs/improve-installation-docs

Conversation

@erdemuysalx

@erdemuysalx erdemuysalx commented Apr 17, 2026 •

Copy link
Copy Markdown

Summary

  • Add a uv tool install section to the README as the recommended installation path, surfacing a single-command install for uv users.
  • Rewrite the pip section to include the required python3 -m venv + source .venv/bin/activate steps so readers aren't tripped up by PEP 668 when installing against a system Python.

Related Issue

  1. Issue uv tool installs? readme update ? #210 asked whether uv tool install notebooklm-py (and the [browser] variant) should be documented for uv users. It's the cleanest install path and deserves first-class placement.
  2. The current pip install notebooklm-py snippet omits virtual-environment setup. On modern Python distributions that enforce PEP 668 (Homebrew Python, Debian/Ubuntu system Python, etc.), running pip install directly fails with externally-managed-environment. New users hit this immediately.

Changes

  • README.md — Installation section restructured into two subsections:
    • ### Using uv (recommended) — uv tool install notebooklm-py and uv tool install "notebooklm-py[browser]".
    • ### Using pip — now shows the full venv + activate + pip install flow.

Test Plan

  • I tested these changes locally
  • Tests pass (pytest)
  • Linting passes (ruff check src/ tests/)
  • Formatting passes (ruff format --check src/ tests/)
  • Type checking passes (mypy src/notebooklm --ignore-missing-imports)

Additional manual verification:

  • Rendered the README locally to confirm the new subsections display correctly.
  • Verified uv tool install notebooklm-py installs the CLI and notebooklm --help works.
  • Verified the documented pip flow (venv → activate → pip install) works end-to-end.

Notes

Docs-only change, no code paths touched, no CI impact beyond markdown linting.

Summary by CodeRabbit

  • Documentation
    • Added uv package manager installation instructions, including optional setup for browser login support
    • Clarified that a virtual environment must be activated before using pip to install the package
    • Improved installation section organization

@coderabbitai

coderabbitai Bot commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The README.md installation documentation was updated to add a dedicated subsection for installing with uv package manager, including basic installation and optional browser login setup. The existing pip installation instructions were clarified to explicitly require an activated virtual environment.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added installation subsection for uv with basic and browser login setup commands; clarified pip installation requirements and repositioned command block.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Installation paths now gleam so bright,
With uv and pip instructions tight,
Virtual realms are crystal clear,
The setup journey smooth, my dear! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: improving installation instructions for both uv and pip setup methods, which directly matches the PR's primary objective of documenting two distinct installation flows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 104-110: The README's virtualenv activation example only shows
POSIX activation after the `python3 -m venv .venv` step and needs Windows
variants; update the section that contains `python3 -m venv .venv` and `source
.venv/bin/activate` to also include Windows activation commands (PowerShell and
cmd.exe) so Windows users can activate the venv (e.g., add entries referring to
`.venv\Scripts\Activate.ps1` for PowerShell and `.venv\Scripts\activate.bat` for
cmd.exe).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b302b922-78e2-490a-8cb1-72c8f680c3ea

📥 Commits

Reviewing files that changed from the base of the PR and between fd8c5c2 and 77138b0.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md
Comment on lines +104 to +110
`pip install` requires an activated virtual environment on most modern systems:

```bash
# Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a Windows venv activation command to avoid install dead-ends.

Line 109 only shows POSIX activation (source .venv/bin/activate), but the README also lists Windows support. Please add a PowerShell/CMD variant here to keep the pip flow platform-complete.

💡 Suggested docs patch
 `pip install` requires an activated virtual environment on most modern systems:

 ```bash
 # Create and activate a virtual environment
 python3 -m venv .venv
 source .venv/bin/activate
+# Windows (PowerShell): .venv\Scripts\Activate.ps1
+# Windows (cmd.exe): .venv\Scripts\activate.bat
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 104 - 110, The README's virtualenv activation example
only shows POSIX activation after the `python3 -m venv .venv` step and needs
Windows variants; update the section that contains `python3 -m venv .venv` and
`source .venv/bin/activate` to also include Windows activation commands
(PowerShell and cmd.exe) so Windows users can activate the venv (e.g., add
entries referring to `.venv\Scripts\Activate.ps1` for PowerShell and
`.venv\Scripts\activate.bat` for cmd.exe).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the README to include modern installation instructions, recommending the use of uv for isolated environments and clarifying the requirement for virtual environments when using pip. A correction was suggested for the Playwright installation step to use uvx, ensuring the command is executable without manual PATH configuration.

Comment thread README.md

# With browser login support (required for first-time setup)
uv tool install "notebooklm-py[browser]"
playwright install chromium

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When installing via uv tool install, the playwright command is not automatically added to your system's PATH because uv only exposes the entry points of the package itself (i.e., notebooklm). To install the required browser binaries, you should use uvx (or uv tool run) to execute the playwright installer in a temporary environment.

Suggested change
playwright install chromium
uvx playwright install chromium

@teng-lin teng-lin added the documentation Improvements or additions to documentation label May 3, 2026
@thedavil

Copy link
Copy Markdown

Nice ! thanks for actioning this !!

@teng-lin

Copy link
Copy Markdown
Owner

Thanks for the contribution and for digging into the PEP 668 friction — this is a real pain point.

After review, we're going to close this PR without merging, but the underlying motivation is good and we're tracking the broader fix in #414. The short version of why we're not landing this as-is:

  • Duplication: this adds a new uv section alongside the existing ### CLI-only install (uv tool / pipx) block, leaving two overlapping uv-install paths.
  • uv tool install + playwright install chromium doesn't work as written: uv tool only puts the primary package's entry points (notebooklm) on $PATH, not transitive deps like playwright. The robust invocation is uv tool run --from notebooklm-py playwright install chromium.
  • CLI vs library framing: uv tool install cannot satisfy from notebooklm import ... in a user's own project; the existing "CLI-only" heading captures that, and labeling uv as "recommended" without that caveat misleads library users.
  • Issue uv tool installs? readme update ? #210 (which inspired the PR) was already addressed by the existing CLI-only section — so the right scope here is a wider restructure rather than a layered addition.

Please don't let this discourage you from future PRs — the PEP 668 venv-setup point in particular is exactly the kind of friction we want documented, and it'll go straight into the overhaul.

@teng-lin teng-lin closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants