Python Forum
no module named 'docx' when importing docx
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
no module named 'docx' when importing docx
#1
When i run
import docx
i get
Error:
ModuleNotFoundError: No module named 'docx'
.

In the windows prompt i executed
Output:
(venv) C:\Users\Username>pip install python-docx Requirement already satisfied: python-docx in c:\users\Username\venv\lib\site-packages (1.1.0) Requirement already satisfied: lxml>=3.1.0 in c:\users\Username\venv\lib\site-packages (from python-docx) (5.0.0) Requirement already satisfied: typing-extensions in c:\users\Username\venv\lib\site-packages (from python-docx) (4.9.0)
What is going wrong?
Reply
#2
Are you using a virtual environment? If so, did you activate the virtual environment before running pip install python-docx?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting parts of paragraphs from word documents using python-docx library & lists Den0st 1 28,356 Oct-08-2025, 05:56 AM
Last Post: OtiliaGen
  Using moviepy fails due to "ModuleNotFoundError: No module named 'pip._internal.utils sheepog 2 2,477 May-28-2025, 06:57 PM
Last Post: sheepog
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 3 5,230 May-10-2025, 05:56 PM
Last Post: Wimpy_Wellington
  ModuleNotFoundError: No module named 'tkcalendar', Thonny, Windows 10 Edward_ 4 6,422 Apr-06-2025, 07:56 PM
Last Post: Edward_
  No module named 'importlib.metadata' EdVS 3 3,255 Jan-30-2025, 09:55 AM
Last Post: Larz60+
  ModuleNotFoundError: No module named 'athena_read' raman 2 2,385 Jul-01-2024, 07:52 AM
Last Post: Gribouillis
  docx file to pandas dataframe/excel iitip92 1 5,689 Jun-27-2024, 05:28 AM
Last Post: Pedroski55
  Python Code Help - pip install PyMuPDF python-docx pillow Splishsplash92 3 5,022 Jun-05-2024, 06:49 AM
Last Post: Pedroski55
  importing variables from module 8376459 1 1,472 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 35,248 Nov-02-2023, 08:20 AM
Last Post: South_east

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020