1

I will state that my goal was simply to write to a docx file for the following reasons:

  1. I am building a study guide and I thought have a little automation to do so in the labeling process would be easier
  2. I like to challenge myself to make my code work

I have tried:

  • pip install python-docx
  • pip install docx
  • pip uninstall python-docx
  • pip uninstall docx
  • pip3 install python-docx
  • pip3 install docx

Though I am still getting a ModuleNotFoundError error message, could anyone think of what to try next?

Traceback (most recent call last):

File "c:\users\xxx\onedrive\desktop\my programs\having fun.py", line 2, in import docx ModuleNotFoundError: No module named 'docx'

taylor.2317
  • 582
  • 1
  • 9
  • 23
RyanB2021
  • 11
  • 1
  • What version of python are you running? According to what I read python-docx is dependent on Python 2.6, 2.7, 3.3, or 3.4. – itprorh66 Dec 11 '21 at 15:24
  • I am running 3.9, I will see if I can get it to work with one of the ones listed, but I am not sure if I actually addressed the real issue I am having, I am trying to write to a .docx file, now I can get it to open in google docs, but it will not open in word. Is there something I am missing / do I really need to import docx? – RyanB2021 Dec 11 '21 at 15:31

0 Answers0