Not at all, you can use any TOTP app and the list does include desktop options. I like https://authy.com/ , from Twilio, and use it both on my desktop and phone. I've started using it to enable TOTP backup/syncing, and I've been using it for PyPI 2FA for years now.
Or you can implement your own, TOTP is not complicated. Here's a Python library that does the heavy lifting for you: https://github.com/pyauth/pyotp .