-1

So this is a question that has been asked many times. And I followed all the things found on the interwebs, however. My icon just isn't appearing, and I'm not getting any sort of error message. The rest of my program functions fine, it's just the darn ugly icon.

Here's my setup.py file, please let me know if/what I'm doing wrong? Sorry if there is a dumb error. :(

import os, os.path, sys
import subprocess
from distutils.core import setup
import py2exe
import glob
import numpy

sys.argv.append('py2exe')

target = {
'script' : "MY_PROGRAM.py",
'version' : "1.0",
'company_name' : "MY_COMPANY",
'copyright' : "",
'name' : "PROGRAM_NAME", 
'dest_base' : "PROGRAM_NAME", 
'icon_resources': [(1, "MY_ICON.ico")]
}       

opts = {
        'py2exe': { 'includes': ['matplotlib.numerix.random_array', 'dbhash', 
        'anydbm', 'skimage', 'pymorph', 'register'],
        'excludes': ['_gtkagg', '_tkagg'],
        'dll_excludes': ['libgdk-win32-2.0-0.dll',
        'libgobject-2.0-0.dll'],
        'bundle_files': 1
                   }
        }       


setup(
    data_files = [('Images', glob.glob('Images/*.*'))],
    windows = [target],
    zipfile = None
    )
4

1 回答 1

0

……

出于某种原因,它现在可以工作了。我使用不同的网站将我的 png 文件转换为 .ico,瞧,魔术。

:( 这么多的斗争

于 2013-08-19T22:23:34.990 回答