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. spring cloud与加密库jasypt(ulisesbocchio)冲突问题定位

    背景 最近在项目上遇到个问题.项目就是普通的spring cloud,spring cloud在spring boot的基础上多了一些东西,比如支持bootstrap上下文(通过bootstrap.y ...

  2. 探索Web API SpeechSynthesis:给你的网页增添声音

    Web API SpeechSynthesis是一项强大的浏览器功能,它允许开发者将文本转换为语音,并通过浏览器播放出来.本文将深入探讨SpeechSynthesis的控制接口,包括其功能.用法和一个 ...

  3. NC16645 [NOIP2007]矩阵取数游戏

    题目链接 题目 题目描述 帅帅经常跟同学玩一个矩阵取数游戏:对于一个给定的n*m的矩阵,矩阵中的每个元素aij均为非负整数.游戏规则如下: 1.每次取数时须从每行各取走一个元素,共n个.m次后取完矩阵 ...

  4. 【Unity3D】动画回调函数、动画事件、动画曲线

    1 动画回调函数 ​ 动画回调函数是指动画在开始时.执行中.结束时回调的函数,主要有:OnStateEnter.OnStateUpdate.OnStateExit.OnStateMove.OnStat ...

  5. oracle中使用自定义函数解析指定分隔符的字符串

    1.创建字符串表类型 create type tab_varchar is table of varchar2(2000); 2.创建管道函数 create or replace function g ...

  6. win32-localtime的使用

    下面的例子用于反映本地系统的日期格式变化 // locale test #include <stdio.h> #include <locale.h> #include < ...

  7. centos7 安装vmware tool 遇到遇到 kernel-headers 问题修复

    安装 vmware tool 步骤 1. cp VMwareTools-10.3.25-20206839.tar.gz 到 用户目录下 2. tar zxf VMwareTools-10.3.25-2 ...

  8. 【Android逆向】脱壳项目 frida-dexdump 原理分析

    1. 项目代码地址 https://github.com/hluwa/frida-dexdump 2. 核心逻辑为 def dump(self): logger.info("[+] Sear ...

  9. 【LeetCode栈与队列#06】前K个高频元素(TopK问题),以及pair、priority_queue的使用

    前 K 个高频元素 力扣题目链接(opens new window) 给定一个非空的整数数组,返回其中出现频率前 k 高的元素. 示例 1: 输入: nums = [1,1,1,2,2,3], k = ...

  10. 【API Management】使用 APIM Inbound Policy 来修改Content‐Type Header的值

    问题描述 在使用APIM提供API服务管理的场景中,遇见了客户端请求时候发送的请求Header中的Content-Type不满足后台服务器的要求,但是在客户端要求客户修改代码难度较高. 所以面对这样的 ...