"module 'fitz' has no attribute 'open'" #1156
Unanswered
RandomAnass
asked this question in
Looking for help
Replies: 2 comments
-
There exists a package "fitz" on PyPI which you have installed and which has nothing to do with PyMuPDF. |
Beta Was this translation helpful? Give feedback.
0 replies
-
uninstall both completely and reinstall what you need of the two packages. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened to me is like what happened here and here. But I couldn't solve the bug even by following the same instructions.
Describe the bug (mandatory)
In my virtual environment I have this error :
Error while analysing name.pdf : module 'fitz' has no attribute 'open'
.But I dont get this probelem outside the virtual environment.
To Reproduce (mandatory)
Outside the virtual environment I tried :
import fitz fitz.open()
And I got :
Out[2]: Document(<new PDF, doc# 1>)
To install the modules in my virtual environment I used :
pip3 install -r requirements.txt
And in requirements.txt :
Then After the error I tried:
py -3 manage.py shell
>>>import fitz
>>>fitz.open()
And I got:
Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: module 'fitz' has no attribute 'open'
My configuration (mandatory)
The output of
print(sys.version, "\n", sys.platform, "\n", fitz.__doc__)
is : 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)]win32
None
for fitz I got:
fitz.__version__
Beta Was this translation helpful? Give feedback.
All reactions