NBdev stopped working on Windows

NBDev has been working fine for the past few months but suddenly stopped working with git on windows.

'''(mypyenv) C:\Users\myhome\myproject>git add 00_Main.ipynb
/c/Users/myhome/anaconda3/envs/mypyenv/Scripts/nbdev_clean_nbs: line 2: C:/Users/myhome/anaconda3/envs/mypyenv/bin/python: No such file or directory
error: external filter 'nbdev_clean_nbs --read_input_stream True' failed 127
error: external filter 'nbdev_clean_nbs --read_input_stream True' failed
fatal: 00_Main.ipynb: clean filter 'clean-nbs' failed'''

SImilarly in my bash git window I get:

'''$ git add 00_Main.ipynb
nbdev_clean_nbs --read_input_stream True: nbdev_clean_nbs: command not found
error: external filter 'nbdev_clean_nbs --read_input_stream True' failed 127
error: external filter 'nbdev_clean_nbs --read_input_stream True' failed
fatal: 00_Main.ipynb: clean filter 'clean-nbs' failed'''

So technically the error is correct there is no python in C:/Users/myhome/anaconda3/envs/mypyenv/bin/

How is this path set and why might this be failing now after having been working for some months?
Also is git picking up its settings for these files?

My NBdev versions are:
ghapi 0.1.16 py_0 fastai
fastcore 1.3.19 py_0 fastai
fastrelease 0.1.11 py_0 fastai
nbconvert 5.6.1 py37_1
nbdev 1.1.13 py_0 fastai

Note activating the environment I am using and running where python returns the normal python location:

(mypyenv) C:\Users\myhome\myproject>where python
C:\Users\myhome\anaconda3\envs\pathscale\python.exe

I also note that all the nbdev scripts call python at the following location:

#!/bin/sh
'''exec' C:/Users/myhome/anaconda3/envs/mypyenv/bin/python "$0" "$@"  ' '''
# -*- coding: utf-8 -*-
import re
import sys
from nbdev.export2html import nbdev_build_lib
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(nbdev_build_lib())

Have tried reinstalling nbdev, restarting/rebooting eveyything, editing the scripts in anaconda3/envs/mypyenv/Scripts to reflect the actual location of the python.exe… all to no avail

Any insights into this problem and how to resolve it would be would be helpful

3 Likes