Python - GUI2EXE - AttributeError:'module'对象没有属性'Popen'

时间:2013-05-16 20:31:37

标签: python python-2.7 user-interface py2exe

我使用Python 2.7和py2exe,最近我下载了gui2exe最新版本(5.3)。但是当我尝试执行gui2exe.py文件时,它会给我一个错误:

AttributeError: 'module' object has no attribute 'Popen'

我研究了很多但从来没有得到任何解决方案。

请帮忙。

1 个答案:

答案 0 :(得分:1)

看起来某些内容正在从标准库中屏蔽subprocess.py。错误消息可能显示陈旧路径。因此,在您从GUI2exe.py开始的目录中打开一个Python shell,然后键入:

>>> import subprocess
>>> subprocess.__file__

这应该会给你'C:\Python27\lib\subprocess.pyc'。如果没有,你发现了问题。不知怎的,另一个subprocess.py进入了你的PYTHONPATH。