from notebook.auth import passwd; passwd()
이게 아니라
from jupyter_server.auth import passwd; passwd()
이거다
python - ModuleNotFoundError: No module named 'notebook.auth' - Stack Overflow