Well, I completely uninstalled the environments and Anaconda, reinstalled, recreated the virtual environment and imported nbdev and the other python packages.
Then I added this cell to every notebook and it is now working.
# hide
import sys
sys.path.append("…")
Not sure why though as it was working previously without this.
Since you have your notebooks inside of /nbs you need to look one level up. So it actually does make sense if you just had your nbs at the same level as your library (in a directory level perspective) then it wouldn’t be needed (I have to do the same with fastai and my other libraries)
It had been failing on my laptop. However, this weekend I had been on my desktop, and had got it working.
But when I reverted today to my laptop I still get the ModuleNotFoundError, even after having reinstalled Anaconda, virtual environments and nbdev and other python packages.
The code and notebooks (github clone) are on a google drive, so the same code folder for both machines.
Is there some environmental variable which might be different between the two systems, that is used by nbdev?