"RuntimeError: Ninja is required to load C++ extension" BUT Ninja is successfully installed!

As the title suggest, I get this error when the Streamlit app calls a function which uses a library dependent on PyTorch. However, everything works smoothly locally, and I successfully installed all the dependency on he cloud through a conda environment .yml file, included Ninja (see the following pictures).

Screenshot from 2022-01-14 13-41-47

Screenshot from 2022-01-14 13-50-24

The repository I’m trying to deploy can be found here: https://github.com/voidpunk/Trial-AId

Just solved! LOL

SOLUTION:

I just added a packages.txt file with the following dependencies:

ninja-build
build-essential

2 Likes

Great that you found it! And thanks for posting the solution for others to see :wink:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.