Electron 项目使用vue-cli-electron-builder创建,原来我的 Mac 上编译都很正常

自从 Mac 升级到 mac OS ventura version 13.0.1 后打包报错,electron-builder 编译 dmg 安装包编译不出来

报如下错误

• building target=DMG arch=x64 file=dist_electron/NextHuman-1.2.0.dmg
• building block map blockMapFile=dist_electron/NextHuman-1.2.0-mac.zip.blockmap
Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
 
意思是打包编译成dmg安装包文件时找不到 python 了,经过一翻搜索与尝试后用以下步骤修复
  1. 重新安装 python2

    下载地址:https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg 
  2. 使用 
    which python
    

    找到安装后的 python2 真实位置,我的 Mac 上是得到的真实位置路径是

    /Library/Frameworks/Python.framework/Versions/2.7/bin/python
  3. 打开 dmg.js 文件
    /node_modules/dmg-builder/out/dmg.js
  4. dmg.js文件闪找到
     "/usr/bin/python" 

    替换为

    "/Library/Frameworks/Python.framework/Versions/2.7/bin/python"

    或直替换为

   "python"

  5. 保存重新运行后即可正常编译出 dmg 安装包


转载入注明博客园池中物 willian12345@126.com sheldon.wang

github: https://github.com/willian12345

Electron Mac 打包报 Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT 解决方法的更多相关文章

  1. [Error] 'exit' was not declared in this scope的解决方法

    新手刚开始用Linux和c++写程序,可能会出现下面的错误 error: ‘exit’ was not declared in this scope 解决方法是 添加 #include <cst ...

  2. ios clang: error: linker command failed with exit code 1 (use -v to see invocation)解决方法

    当xcode编译时出现这个错误,一般是你的编译源码中存在重复的源码 解决方法:"Build Phases" -> "Compile Sources" 去删 ...

  3. 解决了clang: error: linker command failed with exit code 1 (use -v to see invocation) 解决方法

    1.”Build Settings”->”Enable Bitcode”设置为NO 2.TARGETS -->  Build Settings --> Architectures - ...

  4. 输入指令npx webpack-dev-server报错:Error: Cannot find module ‘webpack-cli/bin/config-yargs‘的解决方法

    输入指令npx webpack-dev-server报错:Error: Cannot find module 'webpack-cli/bin/config-yargs'的解决方法 输入指令:npx ...

  5. Win7系统中提示:本地无法启动MySQL服务,报的错误:1067,进程意外终止的解决方法。

    Win7系统中提示:本地无法启动MySQL服务,报的错误:1067,进程意外终止的解决方法. 在本地计算机无法启动MYSQL服务错误1067进程意外终止.这种情况一般是my.ini文件配置出错了1.首 ...

  6. flask+sqlite3+echarts2+ajax数据可视化报错:UnicodeDecodeError: 'utf8' codec can't decode byte解决方法

    flask+sqlite3+echarts2+ajax数据可视化报错: UnicodeDecodeError: 'utf8' codec can't decode byte 解决方法: 将 py文件和 ...

  7. Fatal error: Using $this when not in object context in 解决方法

    Fatal error: Using $this when not in object context in 解决方法 粗心造成的错误 $this 只存在于下面情况 $obj = new object ...

  8. configure: error: cannot guess build type; you must specify one解决方法

    原文地址:https://blog.csdn.net/hebbely/article/details/53993141 1.configure: error: cannot guess build t ...

  9. 【pycharm】pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法

    pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法 解决方法: 在pycharm的安装目 ...

  10. Parse error: syntax error, unexpected end of file in *.php on line * 解决方法

    Parse error: syntax error, unexpected end of file in *.php on line * 解决方法   这篇文章主要介绍了PHP错误Parse erro ...

随机推荐

  1. 【STL源码剖析】list模拟实现 | 适配器实现反向迭代器【超详细的底层算法解释】

    今天博主继续带来STL源码剖析专栏的第三篇博客了! 今天带来list的模拟实现!话不多说,直接进入我们今天的内容! 前言 那么这里博主先安利一下一些干货满满的专栏啦! 手撕数据结构https://bl ...

  2. PHP header的几种用法

    PHP header的几种用法 定义:header() 函数向客户端发送原始的 HTTP 报头. 1. 跳转页面 header('Location:'.$url); //Location和" ...

  3. 24.3 向量化异常VEH--《Windows核心编程》

    Windows 提供了向量化异常处理(vectored excepation handing,VEH)机制.程序可以注册一个函数,每当异常发送或者一个未处理异常脱离标准SEH的控制时,这个函数就会被调 ...

  4. go中的 位预算,反码、补码、原码

    https://baike.baidu.com/item/%E4%BD%8D%E8%BF%90%E7%AE%97/6888804 首先关于"位运算",看下百度百科就行了. 总结:在 ...

  5. [数据库] 数据库中的DDL、DML、DQL、DCL

    SQL 程序语言有四种类型,对数据库的基本操作都属于这四种类,也就是标题上显示的 DDL.DML.DQL.DCL. 1. DDL DDL(Data Definition Language 数据定义语言 ...

  6. 微信小程序云开发项目-个人待办事项-03【主页】模块开发

    上一篇: 微信小程序云开发项目-个人待办事项-02今日模块开发 https://blog.csdn.net/IndexMan/article/details/124497893 模块开发步骤 本篇介绍 ...

  7. ORACLE FORALL介绍

    ORACLE 10G OFFICIAL DOCUMNET  ---------------------------------------------------------------------- ...

  8. 我的小程序之旅九:微信开放平台unionId机制介绍

    一.机制说明 参考文档:https://developers.weixin.qq.com/minigame/dev/guide/open-ability/union-id.html 如果开发者拥有多个 ...

  9. 【Android 逆向】【攻防世界】基础android

    1. 下载并安装apk,提示要输入密码 2. apk拖入到jadx中看一下 this.login.setOnClickListener(new View.OnClickListener() { // ...

  10. zlib开发笔记(一):zlib库介绍、编译和工程模板

    前言   Qt使用一些压缩解压功能,介绍过libzip库编译,本篇说明zlib库.   zlib库   zlib被设计为一个免费的,通用的,法律上不受限制的-即不受任何专利保护的无损数据压缩库,几乎可 ...