Reputation: 41
I found many questions on this site realized with this problem but none of them was helpful. I uninstalled docx and install the latest version of python-docx, but still getting this error:
C:\Users\Admin\Desktop\bluetooth_control\Deutsch\ofline version>py Spliter.py
Traceback (most recent call last):
File "Spliter.py", line 2, in <module>
import docx
ModuleNotFoundError: No module named 'docx'
C:\Users\Admin>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import docx
>>>
But when i try to import docx module i get no error. Sublimetext is also displaing this error? Why?
Upvotes: 0
Views: 898
Reputation: 40
It is highly likely that you have installed docx module only for py, not for python. Try this:
python -m pip install python-docx
py -m pip install python-docx
Upvotes: 1