Python Forum

Full Version: pdfminer package: module isn't found
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Thanks.
Working on resolving of python mess problem I also upgarded Ubuntu to 20.04.
Now everything seems Ok.
Puthon3: 3.10.7
pdfminer: pdfminer.six, Version: 20220524
But still doesn't work.
Tried example from this link:
Extract text from a PDF using Python
Here is output:
Output:
>>> from pdfminer.high_level import extract_text Traceback (most recent call last): File "/usr/lib/python3.8/idlelib/run.py", line 559, in runcode exec(code, self.locals) File "<pyshell#0>", line 1, in <module> ModuleNotFoundError: No module named 'pdfminer' >>>
Well, I was a little hasty when I said that the problems with python are solved.
I installed IDLE and it seems that this installation also installed python 3.8 because IDLE uses it
But this python 3.8 isn't displayed in the list of alternatives:
Output:
xxx@ALABAMA:~$ update-alternatives --list python3 /usr/bin/python3.10 /usr/bin/python3.6
Any suggestions on how to manage this staff ?
Thanks.
(Sep-17-2022, 08:35 AM)Pavel_47 Wrote: [ -> ]I also upgarded Ubuntu to 20.04.

I installed IDLE and it seems that this installation also installed python 3.8 because IDLE uses it
But this python 3.8 isn't displayed in the list of alternatives:
No IDLE did not install Python 3.8.
As you upgrade to Ubuntu to 20.04 then it come with default Python 3.8.2 installed.
Then you need to figure if you shall use this version or use your python3.10(recommended).
You most make sure that pip -V or pip3- V or python -m pip -V or python3 -m pip -V
install to correct Python version test with which python or which python3.
Quote:No IDLE did not install Python 3.8.
As you upgrade to Ubuntu to 20.04 then it come with default Python 3.8.2 installed.
Then you need to figure if you shall use this version or use your python3.10(recommended).
You most make sure that pip -V or pip3- V or python -m pip -V or python3 -m pip -V
install to correct Python version test with which python or which python3.

Thanks.
I wonder why there is no Python 3.8 in the list of Python alternatives.
Concerning python 3.10 ... I can't use it directly because if 3.10 is pointed as python3, some ubuntu tools (e.g. terminal) don't run.
I guess the only solution to use python 3.10 with my actual ubuntu release is to create virtual environment.
Otherwise - upgrade ubuntu to 22.0, that comes with python 3.10.

Going back to pdfminer.six, is it used the same way as pdfminer?
For example, the PDFPageInterpreter module still present in pdfminer.six?
I have seen numbers that state there are about 10 million python developers in the world.
A large number of these will be using Ubuntu, without a hint of a python problem.

I would suggest that you find a friend or colleague who understands the OS well to help you get your system straightened out.
Once they get all working properly, don't mess with the OS at all, ask for help.
This will save you much grief.
Pages: 1 2 3