Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python py2exe找不到目标脚本_Python_Py2exe - Fatal编程技术网

Python py2exe找不到目标脚本

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位于同一目录中(

这是我的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