ImportError: cannot import name MAXREPEAT with cx_Freeze

后端 未结 6 654
梦谈多话
梦谈多话 2020-12-18 21:04

I\'m running into an issue with cx_Freeze when running a frozen application (works fine unfrozen).

When running the program it results in the following

6条回答
  •  星月不相逢
    2020-12-18 21:48

    _sre is a built in module, so there's no file to include for it, but it doesn't have a MAXREPEAT attribute in Python 2.7.3:

    >>> import _sre
    >>> _sre
    
    >>> _sre.MAXREPEAT
    Traceback (most recent call last):
      File "", line 1, in 
    AttributeError: 'module' object has no attribute 'MAXREPEAT'
    

    My best guess is that your frozen copy somehow has the standard library .py modules from Python 2.7.4, but the compiled Python interpreter from 2.7.3 or an earlier version. I see you're working from /usr/local - maybe it's picking up an older version from /usr.

提交回复
热议问题