Instruction file imported from tedcar/Instant-Scribe (
.cursor/rules/env_checks.mdc). Copyright stays with the author.
-
Pin binary wheels that ship compiled C extensions
- Example:
Pillowmust be explicitly pinned (Pillow==10.3.0on Windows) so that a pre-built.whlis installed rather than a source build missing_imaging. - DO add the pin in
requirements.in; letpip-compilepropagate it. - DON'T leave the version unpinned or allow
pipto attempt a source build.
- Example:
-
Verify NeMo ASR import at check time
system_check.pymust importnemo.collections.asrand fail if it raises (toolkit lacking secondary deps).- When bumping NeMo or Torch versions, run the check locally before committing the lock file.
-
External audio tooling must be on PATH
- The checker calls
sox --versionandffmpeg -version. - If missing: document installation via Chocolatey (
choco install -y sox ffmpeg) and updateREADME.md. - Scripts that rely on audio manipulation must guard with the same checks.
- The checker calls
-
When a new environment breakage is discovered
- FIRST: fix the env (pin wheel, add CLI, etc.).
- THEN: codify the fix as another bullet in this rule file so the mistake is never repeated.
- Example commit message:
rules: add safeguard for <issue>
-
Chocolatey installs require an elevated shell
- Always run
PowerShell(orcmd) with Run as Administrator before invoking Chocolatey; otherwise package extraction may fail with "Unable to obtain lock file access..." errors. - If a previous failed install left behind a GUID-named lock directory under
C:\ProgramData\chocolatey\lib, delete the folder (or runchoco clean --cache) before retrying. - CI or automation scripts must call Chocolatey via
Start-Process -Verb RunAsor equivalent to guarantee admin rights. - Document this prerequisite in
README.mdand any setup scripts that callchoco install.
- Always run