Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/356.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_Python 3.x_Python Requests_Py2app - Fatal编程技术网

Python 如果';请求';包括在内

Python 如果';请求';包括在内,python,python-3.x,python-requests,py2app,Python,Python 3.x,Python Requests,Py2app,如果我没有将requests模块导入到我的应用程序中,我的.app将启动,但如果包含该模块,则在尝试启动py2app编译的.app时会崩溃。我试图将请求包含到Setup.py中,但它仍然崩溃 我已经安装了py2app-0.21,运行Python 3.6.4和MacOs Catalina 10.15.14 控制台中的错误日志: (org.pythonmac.unspecified.testapp.2888[62145]): Service exited with abnormal code: 25

如果我没有将requests模块导入到我的应用程序中,我的.app将启动,但如果包含该模块,则在尝试启动py2app编译的.app时会崩溃。我试图将请求包含到Setup.py中,但它仍然崩溃

我已经安装了py2app-0.21,运行Python 3.6.4和MacOs Catalina 10.15.14

控制台中的错误日志:

(org.pythonmac.unspecified.testapp.2888[62145]): Service exited with abnormal code: 255
Setup.py

from setuptools import setup

    APP = ['test.py']
    DATA_FILES = []

    OPTIONS = {

        'argv_emulation': True,
        'includes': ['requests'],
        'packages': ['requests', 'rumps']

    }

    setup(
        app=APP,
        name='TestApp',
        data_files=DATA_FILES,
        options={'py2app': OPTIONS},
        setup_requires=['py2app'],
    )

错误日志的unspecified.testapp部分告诉我,您需要告诉python应用程序文件的实际位置(相对路径?绝对路径?取决于您的用例)


使用一些路径名操作指向
test.py

错误日志中未指定的.testapp部分告诉我您需要告诉python应用程序文件的实际位置(相对路径?绝对路径?取决于您的用例)


使用一些路径名操作指向
test.py

我已经用详细信息更新了我的问题,我尝试了0.12,但仍然崩溃。我用详细信息更新了我的问题,我尝试了0.12,但仍然崩溃