Mir
Mir

Reputation: 45

"No module named 'docx'" error but "requirement already satisfied" when I try to install

From what I've read, it sounds like the issue might be that the module isn't in the same directory as my script. Is that the case? If so, how do I find the module and move it to the correct location?

Edit In case it's relevant - I installed docx using easy_install, not pip.

Upvotes: 1

Views: 10139

Answers (3)

Dzung Nguyen
Dzung Nguyen

Reputation: 71

Please install python-docx. Then you import docx (not python-docx)

Upvotes: 0

dweeb
dweeb

Reputation: 549

pip show docx This will show you where it is installed. However, if you're using python3 then pip install python-docx might be the one you need.

Upvotes: 1

RES
RES

Reputation: 61

I use pycharm, created a project, you can choose which interpreter you want to use tu run your program, a common problem is having 2 interpreters and installing docx in one, and launching with the other interpreter. Also check the Lib included the packages of docx.

Library

Upvotes: 2

Related Questions