我有一个Python2.7.9应用程序,我使用cx_freeze将其打包为一个二进制文件。我最近更新了sqlalchemy和其他软件包,然后开始遇到以下错误。任何帮助深表感谢!
Copying data from package xml...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cx_Freeze/initscripts/__startup__.py", line 14, in run
module.run()
File "/usr/local/lib/python2.7/site-packages/cx_Freeze/initscripts/Console.py", line 26, in run
exec(code, m.__dict__)
File "vmop.py", line 2, in <module>
import os, sys, logging, json, subprocess, pwd
File "/usr/local/lib/python2.7/json/__init__.py", line 108, in <module>
from .decoder import JSONDecoder
File "/usr/local/lib/python2.7/json/decoder.py", line 24, in <module>
NaN, PosInf, NegInf = _floatconstants()
File "/usr/local/lib/python2.7/json/decoder.py", line 18, in _floatconstants
_BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
**LookupError: no codec search functions registered: can't find encoding**
答案 0 :(得分:1)
好像我只需要在may主程序中导入编码,但是错误是神秘的:
import encodings