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. AIX6.1修改时区/修改时间

    环境 AIX6.1 修改时间 格式:date -n mmddHHMMYY  #mm表示月分,dd表示日期,HH表示小时,MM表示分钟,YY表示年份. 例子:date -n 1204171622  #修 ...

  2. CF1000F One Occurrence题解

    题目链接:CF 或者 洛谷 感觉很经典的题,而且给的 \(5e5\),虽然莫队之类的很好想,但完全没必要去考虑这类算法,这种数据范围常数又大又开盲盒.很显然的具有单 \(log\) 的算法. 回忆下经 ...

  3. ASP.NET Core分布式项目实战(Identity Server 4回顾,Consent 实现思路介绍)--学习笔记

    任务17:Identity Server 4回顾 上一节我们中间留了一部分,登录之后的 RequireConsent,就是用户授权这一步没有做,直接跳过,这种情况可以理解为我们自己比较信任的客户端,这 ...

  4. ASP.NET Core分布式项目实战(客户端集成IdentityServer)--学习笔记

    任务9:客户端集成IdentityServer 新建 API 项目 dotnet new webapi --name ClientCredentialApi 控制器添加验证 using Microso ...

  5. dotnet-cnblog tool 测试案例

    这是测试donet-cnblog工具是否能将正常的Typora图片转换为博客园格式 测试1:本地图片导入 测试2:QQ截图 测试3:url https://pics3.baidu.com/feed/9 ...

  6. .net core微服务之服务发现

    一:nacos https://nacos.io/docs/latest/what-is-nacos/ https://github.com/alibaba/nacos 二:consul https: ...

  7. 服务器网卡,10GE设备相关笔记

    连接线 铜线 六类线基本可以满足万兆, 万兆网络一般只在短程使用铜线, 或者完全不用铜线 光纤 根据带宽和距离, 分为OM2, OM3, OM4等, OM2一般用于千兆或者短距离万兆, 长距离万兆使用 ...

  8. 【OpenGL ES】渐变凸镜贴图

    1 前言 ​ 正方形图片贴到圆形上 中将正方形图片上的纹理映射到圆形模型上,凸镜贴图 中介绍了将圆形图片上的纹理映射到凸镜模型上.如果将原图片逐渐变为凸镜效果,中间的变化过程又是什么样的? ​ 图片的 ...

  9. win32 - 按文件的创建日期排序

    因项目中使用文件的创建日期来命名文件,所以不用额外查找文件的创建日期再进行排序,记录一下 bool AscendingSortByCreationTime(const std::wstring& ...

  10. C#-SendKeys方法的使用

    模拟键盘CTRL+S 的输入 using System; using System.Collections.Generic; using System.Diagnostics; using Syste ...