pack a software in Python using py2exe with 'libiomp5md.dll' not found

Gianni Spear picture Gianni Spear · Mar 18, 2013 · Viewed 12.5k times · Source

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.core import setup
import py2exe

setup(console=["project.py"])  

and I got this message

enter image description here

i tried to exclude 'libiomp5md.dll'

from distutils.core import setup
import py2exe

setup(console=["SegmentationAccuracy.py"])

dll_excludes = ['libiomp5md.dll']

but always i got the same error message "error: libiomo5md.dll: No such file or directory"

my executable contains:

import math
import os
import numpy as np
import sys
import ogr
from progressbar import ProgressBar
from shapely.geometry import Polygon
nan = np.nan

Answer

ChrisB picture ChrisB · Apr 9, 2013

I had the same problem, but calling import numpy within setup.py resolved the issue