March 2015

#this article was transferred from my Blogger. win8 spyder the programm is totally correct, and it did give a correct out put but after the out put there is an error message reads:”spyder error: ‘import sitecustomize’ failed; use -v for traceback” solve:#8 NathanH…@gmail.com I decided to set an environment variable in Windows 7 to see if […]

几个月前编译完全正常的一个py文件昨天重新编译就出了一连串问题。分别解决如下。 1、首先是RuntimeError: maximum recursion depth exceeded导致编译中断。在STO提问得到解决:在setup文件开头添上: import sys sys.setrecursionlimit(5000) 即可。 2.虽然编译出了exe,但是得到的exe运行时报告缺少“_validation”。解决办法是在setup文件中将validation手动include进去,像这样: # mysetup.py import sys sys.setrecursionlimit(50000) from distutils.core import setup import py2exe options = { “py2exe”: {“compressed”:1, “optimize”:2, “includes”:[“scipy.sparse.csgraph._validation”,”scipy.special._ufuncs_cxx”,”sympy.printing.gtk”], “bundle_files”:1} }; setup( windows = [“nlk.py”], options = options, ) 其中的scipy.sparse.csgraph._validation”,”scipy.special._ufuncs_cxx”,”sympy.printing.gtk都是根据后来的报错逐个添加进去的。期间还安装了gtk这个包。至于这是个啥?不知道。 3.最后一个问题是如下报错: OMP: Warning #178: Function GetModuleHandleEx failed OMP: System error #126: The specified module could […]