Opticks python extension on pyd files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Opticks python extension on pyd files

I missed a question on IRC today about python and pyd files. On the off chance the user is subscribed to the lists I'm sending a response.

The question was "Hello,  do any of you know if or how I can get the Python extension for Opticks 4.11 to read .pyd files?"

The python extension does work with pyd files. These are actually Windows DLLs which contain compiled python extensions. If there is one not loading then there are a couple of possible problems.
1) The pyd is linked to another DLL which is not available in the PATH. This is common when the DLL is installed in the same directory as python.exe. Windows will check the directory of the executable for required DLLs so this works when you run the main python interpreter. In the case of Opticks, we're not running that so the executable directory is the Opticks/Bin directory. This will prevent the dynamic loaded from finding DLLs in the python.exe directory. You can copy the necessary DLLs somewhere in the PATH or set your PATH accordingly.

2) The pyd is linked to another DLL which is also used by Opticks but is a different version. This is a common occurrence, especially with Qt. If you install a PyQt msi, it will likely be looking for the latest Qt version but Opticks is a number of version behind. There will be symbol clashes which will prevent the newer Qt DLLs from loading and thus prevent PyQt from working. In order to rectify this, you typically need to build PyQt against the Qt version used by Opticks. This can happen with other libraries as well (xerces, etc.) but Qt is a common problem.

Trevor R.H. Clarke
Software Engineer, Ball Aerospace

This message and any enclosures are intended only for the addressee.  Please
notify the sender by email if you are not the intended recipient.  If you are
not the intended recipient, you may not use, copy, disclose, or distribute this
message or its contents or enclosures to any other person and any such actions
may be unlawful.  Ball reserves the right to monitor and review all messages
and enclosures sent to or from this email address.

Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
Opticks-devs mailing list
[hidden email]