Python Py2exe和ConfigParser错误

Python Py2exe和ConfigParser错误,python,py2exe,configparser,backport,Python,Py2exe,Configparser,Backport,我正在使用Py2exe和ConfigParser,但我有somo问题 我已经从pip安装了configparser(pip安装configparser),它运行良好。在我的代码中,我像这样导入包import ConfigParser,当我执行works时 现在我已经使用py2exe进行了分发,输出控制台消息如下: 以下模块似乎缺失 ['Carbon'、'Carbon.Files'、'\u sysconfigdata'、'backport.configparser'] 执行.exe文件后,错误消息

我正在使用Py2exe和ConfigParser,但我有somo问题

我已经从pip安装了configparser(pip安装configparser),它运行良好。在我的代码中,我像这样导入包
import ConfigParser
,当我执行works时

现在我已经使用py2exe进行了分发,输出控制台消息如下:
以下模块似乎缺失
['Carbon'、'Carbon.Files'、'\u sysconfigdata'、'backport.configparser']

执行.exe文件后,错误消息为:
文件“GUI.py”,第14行,在
文件“configparser.pyc”,第12行,在
ImportError:没有名为backports的模块。configparser

我尝试使用其他类型的导入,如:
从Backport导入configparser
import backport,backport.configparser

结果是一样的

我的setup.py文件:

from distutils.core import setup
import py2exe


opts = {
'py2exe': { 'includes' : ["sys","sip", "time", "decimal"],
            'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg','_fltkagg', '_gtk', '_gtkcairo'],
            'dll_excludes': ['oci.dll','libgdk-win32-2.0-0.dll','libgobject-2.0-0.dll']}
   }

data_files=[]
setup(
  name='Actualizador',
  version='1.0',
  package={'./img/*', './campos/*'},
  scripts=['GUI.py'],
  console=['GUI.py'],
  #windows=["GUI.py"],
  options=opts,
  data_files=data_files,
  zipfile=None
  )
我无法进行分发,也无法解决我的问题。有什么建议吗

谢谢

我解决了这个问题:-)

py2exe使用目录构建跳过某些尚未编译的包的编译。好的,我删除了这个目录,我将backports路径添加到系统路径,然后再次进行分发。还有魔法!这很有效