nbdev-vscode icon indicating copy to clipboard operation
nbdev-vscode copied to clipboard

Error nbdev_clean not found with local nbdev

Open ssslakter opened this issue 1 year ago • 1 comments

I have nbdev installed in my conda project environment, and when I save my notebook nothing happens. I am using WSL.

I then ran the extension in a debug mode, here is an error I get

exec error: Error: Command failed: nbdev_clean --fname /home/slakter/playground/nbs/00_core.ipynb
/bin/sh: 1: nbdev_clean: not found

Also I tried using it on Windows, got similar error

ssslakter avatar Feb 26 '24 15:02 ssslakter

I was getting the same nbdev_clean: not found error in WSL, but using poetry. When installed everything globally, it worked fine using terminal commands, but not in vscode.

Finally fixed it by updating the .pre-commit-config.yaml to specify nbdev as a dependency:

repos:
  - repo: https://github.com/fastai/nbdev
    rev: 2.2.10
    hooks:
      - id: nbdev_clean
        language: python
        additional_dependencies:
          - nbdev

It may not be exactly the same problem, but hopefully useful for anyone else that ends up here

peterbull avatar Jun 17 '24 12:06 peterbull