“invalid active developer path” when attempting to use pip3 after upgrading to macOS Catalina
You are perfect in your thinking. The true error is your machine needs a valid, secured web connection back to Apple’s content delivery network and servers. See if you can download any app from the Mac App Store and then when that’s working, retry the install.

xcode-select --install


Apple generally requires you to allow outbound traffic to the 17.0.0.0 network range, so if you’re on a filtered network, consider using a VPN to get outside the restrictions or have networking open outbound ports for your device to rule that out as an error.

Once you’ve gotten a good install, the select command above will report that the developer tools are installed and to use Software Update to update them. Since you tagged your question Xcode you could install that as well and then run it - it will install the tools as well (including the xcrun tool which is the first item needed by pip3)