Python Win32 Extensions

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Siardéni
Posts: 6
Joined: Sat Jun 13, 2015 8:06 am

Python Win32 Extensions

Post by Siardéni »

Hi,

Does anyone succeed in installing Python Win32 package. (http://starship.python.net/~skippy/win32/Downloads.html)

With this method (https://forum.freecadweb.org/viewtopic.php?t=16851) I managed to install the package pyPDF2 for example. (Thanks to the author)

But for win32com it's more complicated, I used this other link (https://www.quora.com/I-tried-to-instal ... ll-PyWin32), the installation looks OK but I still have an error in the Freecad python console :

Code: Select all

>>> import win32com.client
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\XXX\FreeCAD\bin\lib\site-packages\win32com\__init__.py", line 5, in <module>
    import win32api, sys, os
ImportError: DLL load failed: Le module sp�cifi� est introuvable.
>>> 
My goal is to be able to order other software like Solidworks for example (https://win32com.goermezer.de/cad-syste ... 3dxml.html).

Nico

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10802 (Git)
Build type: Release
Branch: master
Hash: 10ce910c03347a90712327a7cc7be2bcdee13afc
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Siardéni
Posts: 6
Joined: Sat Jun 13, 2015 8:06 am

Re: Python Win32 Extensions

Post by Siardéni »

Hello (self answer - if it can helps someone),

After a lot of tests! it's good for me.
I followed my previous post, but before:
  1. run cmd.exe with the Windows Start button and "Run as Administrator"
  2. Remove all "dll" left by previous installations in the FreeCAD installation directories (See "Check for duplicate Python system files" in : http://starship.python.net/~skippy/win3 ... blems.html)
By

[EDIT] Be careful, I deleted "python27.dll" from the FreeCAD \ bin directory, but it's not a pywin32 file (I could have guessed it !: oops :). Result: without "python.dll" FreeCAD works, but the launch of macros is impossible (and probably other functions) and with "python.dll" pywin32 can not work...
So, I don't have any solutions yet.
Post Reply