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
  ModuleNotFoundError: No module named 'tkcalendar', Thonny, Windows 10 Edward_ 4 538 Apr-06-2025, 07:56 PM
Last Post: Edward_
  No module named 'importlib.metadata' EdVS 3 940 Jan-30-2025, 09:55 AM
Last Post: Larz60+
  ModuleNotFoundError: No module named 'athena_read' raman 2 1,266 Jul-01-2024, 07:52 AM
Last Post: Gribouillis
  docx file to pandas dataframe/excel iitip92 1 2,419 Jun-27-2024, 05:28 AM
Last Post: Pedroski55
  Python Code Help - pip install PyMuPDF python-docx pillow Splishsplash92 3 1,893 Jun-05-2024, 06:49 AM
Last Post: Pedroski55
  importing variables from module 8376459 1 891 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 30,916 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 9,644 Oct-29-2023, 11:33 PM
Last Post: Serg
  Replace a text/word in docx file using Python Devan 4 20,197 Oct-17-2023, 06:03 PM
Last Post: Devan
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 4,361 Oct-04-2023, 02:43 PM
Last Post: mandaxyz

Forum Jump:

User Panel Messages

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