当我运行py2exe转换后创建的可执行文件时收到错误

时间:2019-04-11 17:21:24

标签: pandas python-2.7 py2exe

运行setup.py文件并尝试运行新创建的.exe文件后,我收到一条错误日志,内容为:

    Traceback (most recent call last):
    File "Healthy_temp.py", line 7, in <module>
    File "pandas\__init__.pyc", line 42, in <module>
    File "pandas\core\api.pyc", line 26, in <module>
    File "pandas\core\groupby\__init__.pyc", line 1, in <module>
    File "pandas\core\groupby\groupby.pyc", line 37, in <module>
    File "pandas\core\frame.pyc", line 100, in <module>
    File "pandas\core\series.pyc", line 4390, in <module>
    File "pandas\core\generic.pyc", line 10138, in _add_series_or_dataframe_operations
    File "pandas\core\window.pyc", line 14, in <module>
    File "pandas\_libs\window.pyc", line 12, in <module>
    File "pandas\_libs\window.pyc", line 10, in __load
    File "pandas\_libs\skiplist.pxd", line 31, in initpandas._libs.window
    ImportError: No module named skiplist

我的setup.py文件在这里:

    from distutils.core import setup
    import py2exe
    import matplotlib
    from PyQt4 import QtCore, QtGui
    from AboutDialog import Ui_Dialog
    from matplotlibwidget import MatplotlibWidget
    import sys
    from os import walk
    from os import getcwd
    import pandas
    import numpy
    from glob import glob
    from datetime import datetime
    from math import isnan
    import sip

    # setup(windows=['Healthy_temp.py'])
    setup(options={'py2exe': {'bundle_files': 3, 'compressed': True}}, windows=[
          'Healthy_temp.py'], zipfile=None,
          data_files=matplotlib.get_py2exe_datafiles())

我该怎么做才能解决此问题?

1 个答案:

答案 0 :(得分:0)

将“ pandas._libs.skiplist”添加到“包括”选项列表中。