'Error ModuleNotFoundError: No module named 'pdf2docx'
I am having an issue to work with the lib pdf2docx. Here is the code I am trying to work
from pdf2docx import Converter
pdf_file = 'test_file.pdf'
docx_file = 'test_file.docx'
# convert pdf to docx
cv = Converter(pdf_file)
cv.convert(docx_file, start=0, end=None)
cv.close()
I have installed the lib using pip install pdf2docx and I have tried as well to use sudo.
I tried to use as venv like: create a folder inside this folder, open your command line(cmd)
pip install virtualenv
virtualenv venv
pip install pdf2docx
Any idea about how I can make the script working?
Solution 1:[1]
Require Python >= 3.6. pdf2docx can be installed through:
python3 -m pip install pdf2docx
Solution 2:[2]
I just solved the issue, it looks like I am unable to run the script using Vstudio. The script works using the command line like python3 pdf_to_docx.py.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | GAD3R |
| Solution 2 | Laurent Risser |
