Not *necessarily*. You need to go to a special doctor, and basically, they have to clear you to fly. Different pilot licenses need different “classes” of medical certifications. The highest class is basically flying passengers, and any psych diagnosis can get your medical revoked quickly