Running setup.py install for cffi ... error sudo apt-get install build-essential libssl-dev libffi-dev python-dev Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. sudo rm -rf /usr/lib/python3/dist-packages/yaml sudo rm -rf /usr/lib/python3/dist-packages/PyYAML-* sudo pip3 install PyYAML