I was trying to install pycurl in a virtualenv using pip and I got this error
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from
This link sums up the reason why the errors occur and gives a clear instruction to fix the problem.
https://cscheng.info/2018/01/26/installing-pycurl-on-macos-high-sierra.html
For me, the problem occurred when I upgraded to High-Sierra from El Captain.