Nbdev v2 and password request

I find it unsettling that nbdev v2 now for the 2nd time in the migration procedure asks for my password without even a hint what that is about.
Not only can I not know if that is a sudo procedure, or an html-based github access, or a pypi access that isn’t set up properly with access tokens (so I simply can’t solve this without looking at the code or asking in this forum). , but it also worryies me how much nbdev wants to do now that does indeed require a password.
I’d rather see these things elaborated on in the documentation, explaining that certain things need to be set up before nbdev can be used properly, instead of nbdev magically installing and accessing things.
Maybe I’m just paranoid, but I’m interested to see if anybody else has issues with this?

PS: Sorry for the nag, but I can’t wait to be fully operational with nbdev v2 and it’s just frustrating to be blocked from doing so…
PPS: This password request comes after doing nbdev_install, but, hoping that it basically just does pip install -e . plus some nbdev sugar, I’m puzzled why my password is needed. Most likely pip will need to install some of my dependencies for this repo, but still, shouldn’t need a password? It’s not quarto, that is already installed and reachable in the $PATH.


to illustrate what happens, here a screenshot.
After I press Ctrl-C to cancel the password request, the download starts. Of what, it is not known, scary.
I confirm that quarto is in the path at the end of the screenshot, so I wonder what stuff requires a sudo password from me. (system is Mac).

It’s needed for installing quarto. Feel free to check the source code to see (grep for sudo to find where it’s used). There’s no need to be scared – the code is short and simple and available for you to look at!

Maybe a little note could be printed logging what its up to? :smiley:


but isn’t that a bug then? As I indicate in the screenshot, quarto is already installed and available in the $PATH?

Are you able to identify where in the code a check for quarto could be added?

No. nbdev_install is what you run to install or upgrade quarto. If you don’t want to do that, don’t run that command.

We could do that – I suspect we’ve got some other documentation issue though since I thought if people are running this command, it’s because they want to install or upgrade quarto, so saying that we’re now going to install or upgrade quarto seems a bit redundent!

1 Like

nbdev - Tutorial instructs to use nbdev_install for the editable install:

Now you can create your Python module. To do so, just run nbdev_export from the terminal at the root of your project folder, which builds the .py modules and library from the jupyter notebook.

Before you continue, you should ensure you have the latest version of your Python library and Quarto installed. Run nbdev_install to do an editable install of your local Python library as well as fetch and install the latest version of Quarto.

I concluded from the fact that the nbdev v1 docs explicitly said to use pip install -e . for the local install while nbdev v2 docs for “Build and install lib” have that part removed and only the above text instead, that using nbdev_install is mandatory for doing a local install.
From your statements I gather that the usual pip install -e . remains the recommended way to do a local install without a quarto install. This isn’t clear from the current docs.
However, if the quarto installer would just check if the quarto command is already available, then the current docs could remain like they are without creating any issue.

The docs seem to be correct. They say “as well as fetch and install the latest version of Quarto”. (If you want this optimised to check for the latest and only install it if it’s newer, we’d be happy to take a PR as long as it doesn’t turn out to be too complicated.)

If you want to only pip install -e ., without installing the latest quarto, then yes you should just do that directly.

1 Like

Btw, I’m reworking the tutorial atm, and will be paying particular attention to this since it’s a common point of confusion


Should be clearer now. In InstallationInstall Quarto:

and in Make your first editInstall your package:


That happened to me because I was running nbdev on the home of my computer instead of the folder.

At the begging I freak out but then I realized that I was in the incorrect folder.
Once you switch to the correct folder it works as expected.