Python Forum
using fitz to manipulate pdf
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
using fitz to manipulate pdf
#1
Hi,
I used pip3 to install fitz No errors

When I try to import fitz I get:

Quote:>>> import fitz
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import fitz
File "/home/pedro/.local/lib/python3.6/site-packages/fitz/__init__.py", line 1, in <module>
from frontend import *
ModuleNotFoundError: No module named 'frontend'

In

Quote:/home/pedro/.local/lib/python3.6/site-packages/fitz

there are 3 files

frontend.py _init_.py and .DS_Store

and 2 directories

__pycache__ and tools

_init_.py looks like this:

Quote:from frontend import *
import tools
import os.path as op

__version__ = '0.0.1dev2'
__license__ = 'BSD-3'
__author__ = 'Erik Kastman'
__author_email__ = '[email protected]'
__maintainer_email__ = '[email protected]'
__url__ = 'https://github.com/kastman/fitz'
__downloadUrl__ = 'https://github.com/kastman/fitz/releases'

but it obviously does not find frontend.py, so fitz will not import.

Can you please tell me where should I put frontend?? Or where will Python look for frontend.py??
Reply
#2
In the current online version (0.0.2), it is from . import *. This could solve the problem. Try to download the latest version of the library.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Openpyxl manipulate excel write formula SamLiu 0 1,002 Nov-04-2022, 03:00 PM
Last Post: SamLiu
  How do I manipulate musical notes using Python? rockproper 3 3,202 Jul-07-2019, 11:06 AM
Last Post: rockproper
  DB_ methods to calculate/manipulate data issac_n 0 2,247 Dec-26-2017, 07:03 AM
Last Post: issac_n
  How to manipulate csv 2 Prince_Bhatia 4 3,644 Nov-24-2017, 10:16 AM
Last Post: Prince_Bhatia
  How to manipulate csv Prince_Bhatia 4 3,274 Nov-06-2017, 09:11 AM
Last Post: Prince_Bhatia
  Python 3.5 Instantiate and manipulate object with multiprocessing jipete 1 4,815 Dec-28-2016, 12:46 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020