Watch out for Python package conflicts!
Python has dependencies on a number of external projects. Two that I know have been involved in issues are OpenSSL and GNU readline. Although wrapper modules for both libraries are present in standard Python distributions, for some reason or other each has separate packages such as "python-openssl" (distro?) and "py36-readline" (MacPorts). (The MacPorts case is egregious as the core python36 package recommends installing py36-readline although core is already linked to readline in the MacPorts distro -- which results in a segfault as soon as you try to edit!)
Known core vs. package conflicts: OpenSSL, GNU readline
Symptom(s) of python-openssl conflict: difficulty using Django allauth authorization (errors in httpd log)
Symptom(s) of py*-readline conflict: segfault when editing