AlJohri / docx2pdf

MIT License
506 stars 96 forks source link

Docx2PDf will not install with Python 3.10 #48

Closed slrommel closed 2 years ago

slrommel commented 2 years ago

I have just installed Python 3.10 and went to install doc2pdf. I maintain old releases of Python (until the new one has all libraries I use), so I work via the pip3.10 command to make sure it is installing in the proper version. The issue seems to be with the version of pywin32. I've tried to pip3.10 install pywin32==227, and it has failed. The current version of pywin32 is version 302 (obviously for Python 3x). Please see the error log I'm seeing for the docx2pdf install below.

Thanks for the help!

C:\WINDOWS\system32>pip3.10 install docx2pdf Collecting docx2pdf Using cached docx2pdf-0.1.7-py3-none-any.whl (6.6 kB) Using cached docx2pdf-0.1.6-py3-none-any.whl (6.6 kB) Using cached docx2pdf-0.1.5-py3-none-any.whl (5.7 kB) Using cached docx2pdf-0.1.4-py3-none-any.whl (5.6 kB) Using cached docx2pdf-0.1.3-py3-none-any.whl (5.6 kB) Using cached docx2pdf-0.1.1-py3-none-any.whl (5.5 kB) Using cached docx2pdf-0.1.0-py3-none-any.whl (4.7 kB) ERROR: Cannot install docx2pdf==0.1.0, docx2pdf==0.1.1, docx2pdf==0.1.3, docx2pdf==0.1.4, docx2pdf==0.1.5, docx2pdf==0.1.6 and docx2pdf==0.1.7 because these package versions have conflicting dependencies.

The conflict is caused by: docx2pdf 0.1.7 depends on pywin32<228 and >=227; sys_platform == "win32" docx2pdf 0.1.6 depends on pywin32<228 and >=227; sys_platform == "win32" docx2pdf 0.1.5 depends on pywin32<228 and >=227; sys_platform == "win32" docx2pdf 0.1.4 depends on pywin32<228 and >=227; sys_platform == "win32" docx2pdf 0.1.3 depends on pywin32<228 and >=227; sys_platform == "win32" docx2pdf 0.1.1 depends on pywin32<228 and >=227; sys_platform == "win32" docx2pdf 0.1.0 depends on pywin32<228 and >=227; sys_platform == "win32"

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict
AlJohri commented 2 years ago

I think this should now be fixed with https://github.com/AlJohri/docx2pdf/commit/bf921c1ce9158927b4fa9b5a3ac3bba6892c6663

released on version 0.1.8

let me know if there are any issues

slrommel commented 2 years ago

Thanks so much! At first glance this does appear to be fixed. I'm taking code from Python 3.9.x which now seems to run in Python 3.10. Again thanks for the fix!