Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/297.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编写的服务转换为可执行文件_Python_Dll - Fatal编程技术网

将用python编写的服务转换为可执行文件

将用python编写的服务转换为可执行文件,python,dll,Python,Dll,我已经用python编写了一个windows服务。当我通过命令行运行服务时,使用 python service.py install python service.py start 它运行得很好。 现在我想把它转换成一个可执行文件。我使用py2exe并运行以下命令 python setup.py py2exe 但当它到达下一行时,应用程序就会崩溃 复制DLL copying C:\Python27\w9xpopen.exe -> C:\True copy\dist

我已经用python编写了一个windows服务。当我通过命令行运行服务时,使用

python service.py install
python service.py start
它运行得很好。 现在我想把它转换成一个可执行文件。我使用py2exe并运行以下命令

python setup.py py2exe
但当它到达下一行时,应用程序就会崩溃

复制DLL

    copying C:\Python27\w9xpopen.exe -> C:\True copy\dist  
    copying C:\Python27\python27.dll -> C:\True copy\dist  
    setting sys.winver for 'C:\True copy\dist\python27.dll' to 'py2exe'  
    copying C:\Python27\pywintypes27.dll -> C:\True copy\dist  
    copying C:\Python27\lib\site-packages\py2exe\run_w.exe -> C:\True copy\dist\service.exe

有人能告诉我为什么以及如何解决这个问题吗?

这个应用程序是如何崩溃的?请显示完整的错误消息输出-所有内容。请尝试删除路径名中的空格。使用
C:\Truecopy\dist
而不是
C:\Truecopy\dist