Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'pdfminer' #959

Open
st-little opened this issue Apr 15, 2024 · 2 comments
Open

ModuleNotFoundError: No module named 'pdfminer' #959

st-little opened this issue Apr 15, 2024 · 2 comments

Comments

@st-little
Copy link

st-little commented Apr 15, 2024

I have installed pdfminer.six with the help of the Extract text from a PDF using Python, but I get the following error

$ pipx install pdfminer.six
  installed package pdfminer-six 20231228, installed using Python 3.12.2
  These apps are now globally available
    - dumppdf.py
    - pdf2txt.py
done! ✨ 🌟 ✨
$ pdf2txt.py --version
pdfminer.six v20231228
$ python extract-text.py
Traceback (most recent call last):
  File "/workspaces/pdfminer-six/extract-text.py", line 2, in <module>
    from pdfminer.high_level import extract_text
ModuleNotFoundError: No module named 'pdfminer'

Is there a solution?

# extract-text.py
from pdfminer.high_level import extract_text
text = extract_text('test.pdf')
print(text)
@EduardoNeville
Copy link

Have you tried running using the pipx command?
pipx run extract-text.py
Check the github documentation for better usage of pipx:
When running
python extract-text.py
you are running the file using your local python environment not the pipx environment you created.

@st-little
Copy link
Author

Yes, I ran the pipx command. The result is as follows.

$ pipx run extract-text.py
Traceback (most recent call last):
  File "/workspaces/pdfminer-six/extract-text.py", line 2, in <module>
    from pdfminer.high_level import extract_text
ModuleNotFoundError: No module named 'pdfminer'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants