-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
BlackBoiler/python-docx
#23Description
Trying to use python-docx and getting this error when I try to import it:
Traceback (most recent call last):
File "/home/damiano/Documents/scriptbuilder/scriptbuilderui.py", line 7, in <module>
from docx import Document
File "/home/damiano/.local/lib/python3.10/site-packages/docx/__init__.py", line 11, in <module>
from docx.api import Document
File "/home/damiano/.local/lib/python3.10/site-packages/docx/api.py", line 12, in <module>
from docx.package import Package
File "/home/damiano/.local/lib/python3.10/site-packages/docx/package.py", line 7, in <module>
from docx.image.image import Image
File "/home/damiano/.local/lib/python3.10/site-packages/docx/image/__init__.py", line 7, in <module>
from docx.image.bmp import Bmp
File "/home/damiano/.local/lib/python3.10/site-packages/docx/image/bmp.py", line 3, in <module>
from .image import BaseImageHeader
File "/home/damiano/.local/lib/python3.10/site-packages/docx/image/image.py", line 14, in <module>
from typing_extensions import Self
ImportError: cannot import name 'Self' from 'typing_extensions' (/usr/lib/python3/dist-packages/typing_extensions.py)
relevant code looks like this:
from docx import Document
doc = Document()
and yes, i installed the correct module, via pip install python-docx
I'm on Linux Mint 21.3 and Python version 3.10.12. sudo apt-get update
and sudo apt-get upgrade
do not turn up any new versions of python.