在使用esky冻结应用程序时,我遇到了以下错误。当使用py2exe作为冰柜模块时,就会发生这种情况。
error: c:\docume~1\user\locals~1\temp\tmpkizl0t\scripts\my_script.py:
The process cannot access the file because it is being used by another process只有当我在我的代码中使用渐近模块并将其添加到我的setup.py文件的包中时,才会出现错误。下面是我的setup.py文件的"options“部分:
options = {
'bdist_esky': {"freezer_module":"py2exe",
'includes':['encodings','Symbolic','matplotlib','Sequence','ClientTCP',
'XMLSequenceParser','XMLSequenceWriter','utils.widgets',
'pylab','ConfigParser','numpy','xml.etree.ElementTree','logging',
're','json','pylab','socket','struct','threading','traceback',
'utils.liststore','Reporter','tempfile', 'filecmp','os',
'cairo', 'pango', 'pangocairo', 'atk', 'gobject', 'gio','matplotlib.backends.backend_qt4agg','sympy'],
}
},通过Thomas K的回答解决了以下问题:
如果我使用cx_freeze作为freezer模块,那么构建就完成了,但是当我尝试运行可执行文件时,我得到了一个类似的错误:
Traceback (most recent call last):
File "cx_Freeze__init__.py", line 743, in <module>
File "cx_Freeze__init__.py", line 332, in bootstrap
File "cx_Freeze__init__.py", line 359, in chainload
File "cx_Freeze__init__.py", line 729, in _chainload
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27
, in <module>
exec code in m.__dict__
File "c:\docume~1\user\locals~1\temp\tmpyisdxd\scripts\my_script.py", line 1447,
in <module>
NameError: name '__file__' is not defined有没有人遇到过这个问题?
发布于 2013-09-20 04:36:05
该错误似乎表明某个其他进程正在使用其中一个SymPy文件。也许重启电脑就能修复它?
https://stackoverflow.com/questions/18892380
复制相似问题