AS编译报错 Cause: error=86, Bad CPU type in executable

背景情况:从windows转到Mac,从git上把项目clone下来跑,报Cause: error=86, Bad CPU type in executable错

解决方案:升级rosetta库,然后编译,解决。

升级库指令:

sudo softwareupdate --install-rosetta

- 然后输入密码

- 然后entry A

- 结束

D:\yangdunfang\anaconda3\envs\yolov5-master\python.exe D:\yangdunfang\yolov5-master\train.py Traceback (most recent call last): File "D:\yangdunfang\anaconda3\envs\yolov5-master\lib\site-packages\git\__init__.py", line 296, in <module> refresh() File "D:\yangdunfang\anaconda3\envs\yolov5-master\lib\site-packages\git\__init__.py", line 287, in refresh if not Git.refresh(path=path): File "D:\yangdunfang\anaconda3\envs\yolov5-master\lib\site-packages\git\cmd.py", line 860, in refresh raise ImportError(err) ImportError: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh(<full-path-to-git-executable>) All git commands will error until this is rectified. This initial message can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|silent|none|n|0: for no message or exception - warn|w|warning|log|l|1: for a warning message (logging level CRITICAL, displayed by default) - error|e|exception|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\yangdunfang\yolov5-master\train.py", line 102, in <module> GIT_INFO = check_git_info() File "D:\yangdunfang\anaconda3\envs\yolov5-master\lib\contextlib.py", line 79, in inner return func(*args, **kwds) File "D:\yangdunfang\yolov5-master\utils\general.py", line 406, in check_git_info import git File "D:\yangdunfang\anaconda3\envs\yolov5-master\lib\site-packages\git\__init__.py", line 298, in <module> raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be in
最新发布
09-20
Traceback (most recent call last): File "D:\Anaconda1\envs\yolov5\lib\site-packages\git\__init__.py", line 296, in <module> refresh() File "D:\Anaconda1\envs\yolov5\lib\site-packages\git\__init__.py", line 287, in refresh if not Git.refresh(path=path): File "D:\Anaconda1\envs\yolov5\lib\site-packages\git\cmd.py", line 631, in refresh raise ImportError(err) ImportError: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh(<full-path-to-git-executable>) All git commands will error until this is rectified. This initial message can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|silent|none|n|0: for no message or exception - warn|w|warning|log|l|1: for a warning message (logging level CRITICAL, displayed by default) - error|e|exception|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\fuxian\yolov5-7.0\train.py", line 66, in <module> GIT_INFO = check_git_info() File "D:\Anaconda1\envs\yolov5\lib\contextlib.py", line 75, in inner return func(*args, **kwds) File "D:\fuxian\yolov5-7.0\utils\general.py", line 350, in check_git_info import git File "D:\Anaconda1\envs\yolov5\lib\site-packages\git\__init__.py", line 298, in <module> raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh(<full-path-to-git-executable>) All git commands will error until this is rectified. This initial messa
05-17
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值