Monoj Chakraborty
Monoj Chakraborty

Reputation: 15

using pikepdf in python

After installing pikepdf, while trying code with pikepdf, I am getting error messages as below :

enter image description here

Upvotes: 1

Views: 1445

Answers (2)

M Z
M Z

Reputation: 4799

  1. It's Pdf, not pdf. Use:
from pikepdf import Pdf
  1. Using from pikepdf import ... does not actually import pikepdf itself. Run this to load it:
import pikepdf
  1. It's Pdf.open() not pikepdf.open()

It seems best for you to review the docs for pikepdf.

Upvotes: 0

Prabhat Kumar Sahu
Prabhat Kumar Sahu

Reputation: 994

You can restart your kernel of your notebook and install pikepdf

!pip install pikepdf

Then you should import it by

from pikepdf import pdf

and so on.

You should install your dependencies first then run the code.

Upvotes: 0

Related Questions