Search code examples
pythonnumpymatplotlibpy2exe

Py2Exe, [Errno 2] No such file or directory: 'numpy-atlas.dll'


I have included matplotlib in my program, I searched about numpy_atlas.dll on google and I seem to be the only one on Earth with this problem.

setup.py

from setuptools import setup
import py2exe

setup(console=['EulerMethod.py'])

Running Py2Exe results in error

C:\(..obmitted..)>python setup.py py2exe
running py2exe
*** searching for required modules ***
*** parsing results ***
......
...obmitted...
......
*** finding dlls needed ***
error: [Errno 2] No such file or directory: 'numpy-atlas.dll'

Solution

  • Sounds like py2exe can't find dll. Following script will make py2exe quiet:

    distutils.core.setup(
    options = {
        "py2exe": {
            "dll_excludes": ["MSVCP90.dll"]
        }
    },
    ...
    

    )

    You still need to make sure that dll is on the user's machine. I believe numpy-atlas.dll is one of matplot dependencies.

    Also consider using PyInstaller if everything else fails.