cyipopt: Windows 10 x64 ImportError: DLL load failed - location issue or binary compatibility issue?

System info:

  • using Python 3.7.2 official installation
  • have VS2019 build tools (cl.exe prints Microsoft (R) C/C++ Optimizing Compiler Version 19.21.27702.2 for x86)

Steps taken:

  • used the latest master branch of cyipopt (0.2.0-dev0), and downloaded the linked Ipopt binary versions
  • python setup.py install runs fine ...Finished processing dependencies for ipopt==0.2.0.dev0
  • however, import ipopt prints
>python
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipopt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\...\AppData\Local\Programs\Python\Python37\lib\site-packages\ipopt-0.2.0.dev0-py3.7-win-amd64.egg\ipopt\__init__.py", line 43, in <module>
    from cyipopt import *
ImportError: DLL load failed: The specified module could not be found.
  • some DLLs are in this location
>ls C:\Users\...\AppData\Local\Programs\Python\Python37\Lib\site-packages\ipopt-0.2.0.dev0-py3.7-win-amd64.egg
EGG-INFO        IpOptFSS.dll   __pycache__                 cyipopt.py  msvcp100.dll
IpOpt-vc10.dll  Ipopt-vc8.dll  cyipopt.cp37-win_amd64.pyd  ipopt       msvcr100.dll

Debugging so far:

  • I have so far looked through https://github.com/matthias-k/cyipopt/issues/21 as well as searched through all the issues in this repo for DLL and looked through the solutions.
  • Is this due to a mismatch in the C compiler that produced the Ipopt binaries and the one that compiled cyipopt on my system? If so, is there a way to know which compiler was used for that, or any link to instructions for recompiling Ipopt?
  • Potentially #41 would alleviate this problem

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

The instructions are here:

https://github.com/matthias-k/cyipopt#from-source-on-windows

But maybe need a little improvement.