Click here to Skip to main content
15,846,211 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this in my script so far, but had to run it because i thought it showed up with an error:
from pdf2docx import parse

And it gives me:
ModuleNotFoundError: No module named 'pdf2docx'

But when i do:
pip install pdf2docx

It tells me that requirement are already satisfied. So it's installed but not accessible in the script. Why?

What I have tried:

I have tried installing it again, tells me requirement already satisfied.
Updated 9-Dec-21 13:37pm

1 solution

I just installed this (see below) and it works fine. Are you sure that your Python paths are set correctly in your environment? You could try to run 'pip uninstall pdf2docx' and then re-install it.

Another way to test this would be to use a Python 'virtual' environment as described at venv — Creation of virtual environments — Python 3.9.9 documentation[^]. That is what I just did and had it set up and tested in a couple of minutes.
Share this answer
Member 14769677 9-Dec-21 8:28am    
Yes, it should be working fine. When i type python --version it gives me Python 3.9.9 or whatever the newest version is.
Richard MacCutchan 9-Dec-21 8:40am    
I have not seen this error myself, but it usually means that the module is either not installed correctly (which pip would confirm), or the path to the script is somehow incorrect when trying to import it. And without access to your system it is impossible to guess any more. Check the contents of your actual PATH variable for the Python directory. And below that "Lib\site-packages" is where all the imports are installed.
Member 14769677 9-Dec-21 8:35am    
I also added the Python/Script folder as suggested in some forum i found, did not work either. Why is software development this unnecessary hard? Makes no sense.
Richard MacCutchan 9-Dec-21 8:41am    
That is not where packages are installed so will not make any difference.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900