InsecurePlatformWarning & Failed building wheel for cryptography | cffi

@saranrapjs - double-plus-good. Been fighting this for quite a while after auditing servers with “lynis” and trying to install “ndg-httpsclient” per the lynis security audit reports. No joy until now. Your solution worked.

First - the error was the same as the question at the top. Specifically it was:

sudo su
pip install ndg-httpsclient

on a clean (e.g. sudo apt-get update && sudo apt-get upgrade -y) ubuntu 14.04.3 box generated the series following series of errors on ubuntu 14.04.3:

Failed building wheel for cryptography
# trace here followed by 
Failed building wheel for cffi
# more trace here ending with
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-nloejD/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-U6h7Db-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nloejD/cffi

From stackoverflow I had tried numerous other solutions but it was running your line of code here:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

Given I already had build-essential, libssl-dev and both python-dev and python3-dev, I have to believe it was specifically the installation of “libffi-dev” that solved the problem although I can’t be sure. It did update four packages as follows:

The following NEW packages will be installed:
libffi-dev libssl-dev libssl-doc zlib1g-dev
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.

Final result was (again I was in “sudo su”)

 pip install ndg-httpsclient
 # trace stuff here....
 Successfully installed PyOpenSSL-0.15.1 cffi-1.4.2 cryptography-1.1.2

The bottom line is thank you for taking the time to post your comment however brief. It saved me time after I had wasted several hours on this issue. THANK YOU @saranrapjs ! #rockon