I work on project in pycharm , i'd like to use pdfminer in order to convert a pdf file to a text file. My problem is when i run the app i't doesn't work and it display this error message : ModuleNotFoundError: No module named 'pdfminer.high_level'
import re
from pdfminer.high_level import extract_pages, extract_text
text = extract_text("_DarkWeb_1642453520.pdf")
print(text)
the full error message:
/home/oran/PycharmProjects/pythonProject/venv/bin/python /home/oran/PycharmProjects/pythonProject/main.py
Traceback (most recent call last):
File "/home/oran/PycharmProjects/pythonProject/main.py", line 2, in <module>
from pdfminer.high_level import extract_pages, extract_text
ModuleNotFoundError: No module named 'pdfminer.high_level'
python version 3.10.4
I suppose that you installed only pdfminer
which is not maintained anymore.
To import the module pdfminer.high_level
, you should go for pdfminer.six
instead by first running this command from your terminal :
pip install pdfminer.six
If you use a virtual environement, use the dash
instead of the dot
.
pip install pdfminer-six
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With