No module named 'fpdf'


When running a python notebook on Losant, I get the error “No module named ‘fpdf’” at the line “from fpdf import FPDF”

In general, how do I import python modules in a Notebook in Losant?

Because Notebooks are executed inside Losant’s infrastructure, the environment is tightly controlled to ensure the highest level of security. For this reason, only modules we’ve pre-installed in the execution environment are available. You can review the details of the execution environment here:

If there are additional dependencies that you require, we’ll happily review those and add them in a future platform update. Please review the above link and make sure a existing module does not already exist that provides similar functionality!

1 Like

Thank you, that’s a helpful link. As far as I can see, there isn’t anything that can create a PDF directly from the notebook which was what I was looking for. That would be helpful.

Thank you!

A PDF of the executed notebook is provided as a default output. Would that work, or are you looking for a way to create custom PDFs?

I am looking for a way to create custom, specifically formatted PDFs.