如何将 Python 3.x 绑定到使用 ReactJs 的 Electron 应用程序?

Son*_*ycı 3 python publish reactjs electron

我有一个电子应用程序要在客户的计算机上使用。

应用程序需要打开 IEDriver.exe 以打开一些带有一些代理的 URL。所以我正在调用一个通过 Python-Shell 包使用 selenium 和 IEDriver 的 python 脚本。

当我构建我的电子应用程序时,它在我的机器上运行良好,因为我已经安装了 Python 3.x。但是当我将其发布给客户使用时,他们的机器上应该安装了 Python 3.x。那么如何将 Python3.x 与我的应用程序捆绑在一起呢?

这是我的构建配置,提前致谢。

    "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build && npm run electron-build",
        "react-build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject",
        "electron-start": "electron .",
        "electron-build": "electron-builder",
        "postinstall": "electron-builder install-app-deps"
    },
    "build": {
      "appId": "sampleAppId",
      "extends": null,
      "win": {
        "asar": true,
        "target": "nsis",
        "icon": "./build/assets/icon.png"
      },
      "nsis": {
        "oneClick": true,
        "installerLanguages": "en_US",
        "displayLanguageSelector": true,
        "multiLanguageInstaller": true,
        "unicode": true
      },
      "files": [
        "./build/**/*",
        "./public/Main.js",
        "./src/electron/*"
      ]
     }
Run Code Online (Sandbox Code Playgroud)

小智 5

你可以捆绑一切使用。Innosetup。

您可以使用独立-便携式 Winpython。