I have Python 2.7 on Window 7 OS. I wish to pack my project.py in an Executable using py2exe. Following the instruction i wrote a setup.py file
from distutils.co
OK, I had the same problem. It turned out that a .pyd file in sklearn was referencing libiomp5md.dll. Py2exe looks in two places for your DLL - on the path environment variable and in the same directory that the .pyd file is in. libiomp5md.dll is in neither. Py2exe pretty much gives up and instead of giving a full path name such as c:\Python27\lib\site-packages\numpy\core\libiomp5md.dll, it says "libiomp5md.dll" which, later on, it can't find.
I'm impatient. I added a line within my setup file:
os.environ["PATH"] += os.pathsep + os.path.dirname(numpy.core.file)
and that's where libiomp5md.dll is. Now everything works. Just make sure you do this in your code prior to calling setup and it will for you too.