Python py2exe找不到目标脚本
这是我的setup.py:Python py2exe找不到目标脚本,python,py2exe,Python,Py2exe,这是我的setup.py: from distutils.core import setup import py2exe, sys, os sys.argv.append('py2exe') setup( options = {'py2exe': {'bundle_files': 1}}, console = [{'script': "target.py"}], zipfile = None, ) 当我运行命令时,target.py与setup.py位于同一目录中(
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1}},
console = [{'script': "target.py"}],
zipfile = None,
)
当我运行命令时,target.py与setup.py位于同一目录中(必须使用完整路径,否则它甚至得不到此响应):
命令中的响应是:
running py2exe
*** searching for required modules ***
error: target.py: No such file or directory
我不确定我做错了什么,这可能很愚蠢。如果有人知道的话,我会很感激你的意见
谢谢,只需使用
cd
命令将当前工作目录更改为C:\Final\
,然后运行:
C:\Python\app\Python.exe setup.py py2exe
running py2exe
*** searching for required modules ***
error: target.py: No such file or directory