-
-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS 12.3 (21E230) Exit code: ENOENT. spawn /usr/bin/python ENOENT #1701
Comments
我也遇到了,有解决办法了吗? |
Please ask is it solved |
how to upgrade electron-builder 23.02+ in vue-cli-plugin-electron-builder |
有解决办法么? |
vue-cli-plugin-electron-builder needs to update its electron-builder dependency to 23.0.3 |
electron-userland/electron-builder#6726 (comment)
|
+1 I'm also running into this issue. |
As a workaround install python 2.7 with pyenv then set PYTHON_PATH when runinng PYTHON_PATH=/Users/PUT_YOUR_USER_HERE/.pyenv/versions/2.7.18/bin/python npm run electron:build |
Can author update the version of electron builder to 23.0.3 in dependency |
There is a simple solution 😂: To install python 2.7, And get the installation path (for example: /XXX/versions/2.7/bin/python); Open "YourProjectPath/node_modules/dmg-builder/out/dmg.js", find "/usr/bin/python", replace with "/XXX/versions/2.7/bin/python". |
Support the m1pro version of python2.7 Where can I download it? I can't find it |
Temporary (and npm native) solution to this is npm overrides (requires npm >= v8):
After changing
result:
Aaand build on mac os 12.3.1 works again :-) |
+1 |
The problem has been solved. Thank you very much ! |
就这个最有用,那个改PYTHON_PATH也无效 |
Install python 2 first$ which python
$ PYTHON_PATH=/path/to/python electron-builder ... |
not working its update to 22.14.13 |
Any other workaround here? |
The current master branch uses electron-builder 23. So you could use that instead of the released version. |
@do-web @billmorgan123 Did you delete Unsure if npm overrides actually overrules package-lock. |
@MarMun - I did delete package-lock before running npm install. Pretty much followed this:
Still what I am seeing is this:
Any help will be greatly appreciated! |
Never mind. My npm was out of date. I was still using npm v 6.14.8 which doesn't support overrides. Updating npm to the latest version resolved this. |
@danline Ah yes. Overrides require >= npm 8. Should have mentioned this. Sorry for the confusion. |
It worked! Thanks a lot |
这方法解决了我的问题👍 |
The GitHub-hosted runners began experiencing issues while building macOS desktop distributions, exclusively affecting the macOS environment. The Ubuntu and Windows environments remained unaffected. The logs highlighted the absence of Python in the macOS environment, which resulted in build failure: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` Since the `electron-builder` package uses Python scripts to create DMG disk images for macOS distributions, Python is needed for building the application. However, electron-builder uses Python 2.X meanwhile modern macOS versions have removed Python 2.X from the operating system on default installation. Although this issue was resolved in `electron-builder` version 23,, `vue-cli-plugin-electron-builder` continues to use version 22. Due to a lack of maintenance, the package is unlikely to receive updates. This commit forces `vue-cli-plugin-electron-builder` to use the latest `electron-builder` which resolves the macOS distribution build failure. In CI process, GitHub-hosted runners start to fail when building macOS desktop distributions. It is only observered in the macOS environment while the application is built successfully in both the Ubuntu and Windows environments. The error message in the logs indicated that Python was not found in the macOS environment: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` `electron-builder` package uses Python scripts for certain operations, specifically for creating DMG disk images for macOS distributions. As a result, Python is a necessary dependency when building the application for macOS. `electron-builder` has fixed this starting from version 23, but vue-cli-plugin-electron-builder still refers to version 22 and it is unmaintained and not likely to get updates. The solution is to add a step in the GitHub Actions workflow to set up Python in the macOS environment. `actions/setup-python` sets up the Python environment in the runner if the OS is macOS. This change does not impact the Ubuntu and Windows environments as the setup-python step is conditionally executed only for macOS. The addition of Python to the macOS environment in CI process has resolved the build failure issue for the macOS distribution. See also: - electron-userland/electron-builder#6606 - electron-userland/electron-builder#6726 - electron-userland/electron-builder#6732 - nklayman/vue-cli-plugin-electron-builder#1691 - nklayman/vue-cli-plugin-electron-builder#1701
备注: ENOENT 表示 "No such file or directory" 参考: nklayman/vue-cli-plugin-electron-builder#1701
The GitHub-hosted runners began experiencing issues while building macOS desktop distributions, exclusively affecting the macOS environment. The Ubuntu and Windows environments remained unaffected. The logs highlighted the absence of Python in the macOS environment, which resulted in build failure: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` Since the `electron-builder` package uses Python scripts to create DMG disk images for macOS distributions, Python is needed for building the application. However, electron-builder uses Python 2.X meanwhile modern macOS versions have removed Python 2.X from the operating system on default installation. Although this issue was resolved in `electron-builder` version 23,, `vue-cli-plugin-electron-builder` continues to use version 22. Due to a lack of maintenance, the package is unlikely to receive updates. This commit forces `vue-cli-plugin-electron-builder` to use the latest `electron-builder` which resolves the macOS distribution build failure. In CI process, GitHub-hosted runners start to fail when building macOS desktop distributions. It is only observered in the macOS environment while the application is built successfully in both the Ubuntu and Windows environments. The error message in the logs indicated that Python was not found in the macOS environment: ```sh Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT ``` `electron-builder` package uses Python scripts for certain operations, specifically for creating DMG disk images for macOS distributions. As a result, Python is a necessary dependency when building the application for macOS. `electron-builder` has fixed this starting from version 23, but vue-cli-plugin-electron-builder still refers to version 22 and it is unmaintained and not likely to get updates. The solution is to add a step in the GitHub Actions workflow to set up Python in the macOS environment. `actions/setup-python` sets up the Python environment in the runner if the OS is macOS. This change does not impact the Ubuntu and Windows environments as the setup-python step is conditionally executed only for macOS. The addition of Python to the macOS environment in CI process has resolved the build failure issue for the macOS distribution. See also: - electron-userland/electron-builder#6606 - electron-userland/electron-builder#6726 - electron-userland/electron-builder#6732 - nklayman/vue-cli-plugin-electron-builder#1691 - nklayman/vue-cli-plugin-electron-builder#1701
Please upgrade electron-builder 23.02 +
The text was updated successfully, but these errors were encountered: