How can I fix an error like `AttributeError: module 'wandb' has no attribute ...`?

Python에서 wandb를 가져올 때 AttributeError: module 'wandb' has no attribute 'init' 또는 AttributeError: module 'wandb' has no attribute 'login'과 같은 오류가 발생하는 경우, wandb가 설치되지 않았거나 설치가 손상되었지만 현재 작업 디렉토리에 wandb 디렉토리가 존재하는 경우입니다. 이 오류를 해결하려면 wandb를 제거하고 해당 디렉토리를 삭제한 다음 wandb를 설치하세요.

pip uninstall wandb; rm -rI wandb; pip install wandb