I installed this python package using pip that was compatible with Python 2.7, in a windows machine. I tried newer versions of the python-docx but those ones did not download properly. Only version 0.8.7 installed successfully and so I am using it right now. I installed it using:
pip install python-docx==0.8.7
But I think it installed a 32 bit version of this package and I am using a 64 bit machine. I know this because while I tried to run my python program using this package I got the error:
Traceback (most recent call last):
File "C:/projects/engine_script/Tools/subprocess_module/create_doc.py", line 2, in <module>
from docx import Document
File "C:\Python27\lib\site-packages\docx\__init__.py", line 3, in <module>
from docx.api import Document # noqa
File "C:\Python27\lib\site-packages\docx\api.py", line 14, in <module>
from docx.package import Package
File "C:\Python27\lib\site-packages\docx\package.py", line 11, in <module>
from docx.opc.package import OpcPackage
File "C:\Python27\lib\site-packages\docx\opc\package.py", line 12, in <module>
from .part import PartFactory
File "C:\Python27\lib\site-packages\docx\opc\part.py", line 12, in <module>
from .oxml import serialize_part_xml
File "C:\Python27\lib\site-packages\docx\opc\oxml.py", line 12, in <module>
from lxml import etree
ImportError: DLL load failed: %1 is not a valid Win32 application.
This is where the package got downloaded to: C:\Python27\Lib\site-packages\lxml-3.3.5-py2.7-win32.egg
Anyone have the link to the 64 bit version (win_amd64.whl) of this package? I tried searching in this link(https://www.lfd.uci.edu/~gohlke/pythonlibs/) but could not find the package I was looking for. I even have the latest lxml package and the package is still not working as the script shows errors.