NameError: name '_C' is not defined
When running a Python project using torch==1.4.0 I got the error in the title. I am using Linux and not using any kind of IDE or notebook.
There are other questions about this, but they were all in Jupyter notebooks or on Windows.

What happened is that the version of libffi I was using was too new. It looks like libffi recently upgraded to version 8, but something (Torch?) required v7. v7 not being present caused some kind of import to fail silently rather than given a clear error, resulting in the error in the title.
I was able to fix this by installing libffi7 using my operating system's package manager.
