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
  importing variables from module 8376459 1 287 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 23,811 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 2,598 Oct-29-2023, 11:33 PM
Last Post: Serg
  Replace a text/word in docx file using Python Devan 4 3,464 Oct-17-2023, 06:03 PM
Last Post: Devan
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 1,460 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,523 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 1,347 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 1,046 Jul-09-2023, 11:24 AM
Last Post: yaoyao22
  docx insert words of previuos paragraph on next paragraph in the same position ctrldan 7 1,253 Jun-20-2023, 10:26 PM
Last Post: Pedroski55
  Help with pyinstaller "No module named" korenron 9 9,138 Jun-15-2023, 12:20 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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