yappi does not import

It’s ordinary that packages like this have some internal implementation details in another file with a leading underscore. If yappi is found but _yappi is not, it can mean that something went wrong with the installation. I checked the project GitHub and I can see that _yappi comes from C code, so maybe there was a problem compiling this code when you tried to install the module? This should normally cause the entire installation to fail, but there could be something strange about how the installation is set up.

Diagnosing the problem properly will require more information, such as:

  • A complete stack trace for the error - copy and paste, starting from the line that says Traceback (most recent call last): all the way to the end, and format it here like multi-line code (as described in the pinned thread).

  • Complete, concrete steps taken for the installation

  • The result of which pip and which python (assuming that you use the command pip to run Pip and python to run Python)

Better yet if you can find a way to reproduce the problem, in a new virtual environment.