I try to run de example in the README.md and give that error.
from pdf2docx import parse
pdf_file = '09_0370.pdf'
docx_file = 'File.docx'
# convert pdf to docx
parse(pdf_file, docx_file, start=0, end=1)
What's wrong?
Have you installed the library first? After that it should work. Please refer to Installation
section in README.md.
If not, say you'd like to use the source code directly, you need to import parse
like:
from pdf2docx.main import parse
Yes, the library is installed, I do a pip freeze
and it appears in the list, applying the method of you said it works well, but I do not know, it seems to me something little optimal to include the folders in my project, I use window 10 x32 Bits in case it is useful. I have uninstalled and reinstalled it but this time from the setup.py
and nothing, it keeps throwing me the same error.
EDIT: Ok, my stupid mistake, I had a file called pdf2docx.py
in my project folder and well, logically the from pdf2docx import parse
pointed to that file instead of the installed libraries, how stupid.
Most helpful comment
Yes, the library is installed, I do a
pip freeze
and it appears in the list, applying the method of you said it works well, but I do not know, it seems to me something little optimal to include the folders in my project, I use window 10 x32 Bits in case it is useful. I have uninstalled and reinstalled it but this time from thesetup.py
and nothing, it keeps throwing me the same error.EDIT: Ok, my stupid mistake, I had a file called
pdf2docx.py
in my project folder and well, logically thefrom pdf2docx import parse
pointed to that file instead of the installed libraries, how stupid.