[OHOS ERROR] FileNotFoundError: [Errno 2] No such file or directory: ‘python‘
问题场景
问题描述
使用ubuntu+window的环境进行编译在一步步操作下来后出现这种错误,无法编译。https://device.harmonyos.com/cn/docs/documentation/guide/ide-hi3861v100-compile-0000001192526021
[OHOS INFO] [234/358] gcc cross compiler obj/test/xts/acts/distributed_schedule_lite/system_ability_manager_hal/src/libmodule_ActsSamgrTest.iunknown_func_test.o
[OHOS INFO] [235/358] ACTION
//test/xts/acts/build_lite:acts_xdevice(//build/lite/toolchain:riscv32-unknown-elf)[OHOS INFO] [236/358] gcc cross compiler
obj/test/xts/acts/communication_lite/lwip_hal/src/libmodule_ActsLwipTest.lwip_func_test.o[OHOS ERROR] [235/358] ACTION
//test/xts/acts/build_lite:acts_xdevice(//build/lite/toolchain:riscv32-unknown-elf)[OHOS ERROR] FAILED: suites/acts/tools
[OHOS ERROR] /usr/bin/python3
…/…/…/test/xts/tools/lite/build/suite.py build_xdevice
–project_dir /home/lshen/download/code-v3.0-LTS/OpenHarmony/test/xdevice
–output_dirs /home/lshen/download/code-v3.0-LTS/OpenHarmony/out/hispark_pegasus/wifiiot_hispark_pegasus/suites/acts/tools,[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File “…/…/…/test/xts/tools/lite/build/suite.py”,
line 273, in[OHOS ERROR] sys.exit(main(sys.argv[1:]))
[OHOS ERROR] File “…/…/…/test/xts/tools/lite/build/suite.py”,
line 268, in main[OHOS ERROR] func()
[OHOS ERROR] File “…/…/…/test/xts/tools/lite/build/suite.py”,
line 187, in build_xdevice[OHOS ERROR] subprocess.check_call(command,
cwd=self.args.project_dir)[OHOS ERROR] File “/usr/lib/python3.8/subprocess.py”, line 359, in
check_call[OHOS ERROR] retcode = call(*popenargs, **kwargs)
[OHOS ERROR] File “/usr/lib/python3.8/subprocess.py”, line 340, in
call[OHOS ERROR] with Popen(*popenargs, **kwargs) as p:
[OHOS ERROR] File “/usr/lib/python3.8/subprocess.py”, line 858, in
init[OHOS ERROR] self._execute_child(args, executable, preexec_fn,
close_fds,[OHOS ERROR] File “/usr/lib/python3.8/subprocess.py”, line 1704, in
_execute_child[OHOS ERROR] raise child_exception_type(errno_num, err_msg,
err_filename)[OHOS ERROR] FileNotFoundError: [Errno 2] No such file or directory:
‘python’[OHOS ERROR] you can check build log in
/home/lshen/download/code-v3.0-LTS/OpenHarmony/out/hispark_pegasus/wifiiot_hispark_pegasus/build.log[OHOS ERROR] command:
“/home/lshen/download/code-v3.0-LTS/OpenHarmony/prebuilts/build-tools/linux-x86/bin/ninja
-w dupbuild=warn -C /home/lshen/download/code-v3.0-LTS/OpenHarmony/out/hispark_pegasus/wifiiot_hispark_pegasus”
failed[OHOS ERROR] return code: 1
[OHOS ERROR] execution path:
/home/lshen/download/code-v3.0-LTS/OpenHarmony
问题分析
系统环境变量中缺少了python。OpenHarmony源码编译过程中,某些过程中使用的是python,有些是python3.
问题解决
根据python -V来查询是否存在,如果不存在,可以通过以下方式设置软链接:
- 查询当前系统环境变量中python3的路径,例如{python3-path}
which python3
- 设置软链接
sudo ln -s {python3-path} /usr/bin/python
谷歌我滴神
[OHOS ERROR] FileNotFoundError: [Errno 2] No such file or directory: ‘python‘相关推荐
- FileNotFoundError: [Errno 2] No such file or directory: ‘pretrained/gated-conv.pth‘
FileNotFoundError: [Errno 2] No such file or directory: 'pretrained/gated-conv.pth' 报错信息 FileNotFoun ...
- libsodium引用报错FileNotFoundError: [Errno 2] No such file or directory: b‘liblibsodium.a‘
问题 操作系统环境:Ubuntu 22.04 在安装一个工具应用时,这个应用使用到了chacha20加密算法,所以需要依赖libsodium.按照网上教程下载源码并编译安装: sudo apt ins ...
- FileNotFoundError: [Errno 2] No such file or directory: _MEI138162\\astor\\VERSION‘
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\me\\AppData\\Local\\Temp\\_MEI13 ...
- python导入pods的时候出现错误:FileNotFoundError: [Errno 2] No such file or directory: ‘D:\\tmp\\sods.log‘
导入Pods库的时候出现错误: import pods FileNotFoundError: [Errno 2] No such file or directory: 'D:\tmp\sods.log ...
- python3 selenium 无头浏览器 错误 FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'
代码: from selenium import webdriver browser = webdriver.Firefox() browser.get('http://localhost:8000' ...
- 成功解决FileNotFoundError: [Errno 2] No such file or directory: '/home/bai/Myprojects/Tfexamples/data/kn
成功解决FileNotFoundError: [Errno 2] No such file or directory: '/home/bai/Myprojects/Tfexamples/data/kn ...
- 成功解决FileNotFoundError: [Errno 2] No such file or directory: 'F:\\Program Files\\Python\\Python36\\li
成功解决FileNotFoundError: [Errno 2] No such file or directory: 'F:\\Program Files\\Python\\Python36\\li ...
- 成功解FileNotFoundError: [Errno 2] No such file or directory: './data\\mnist\\train-images-idx3-ubyte'
成功解FileNotFoundError: [Errno 2] No such file or directory: './data\\mnist\\train-images-idx3-ubyte' ...
- Python:错误FileNotFoundError: [Errno 2] No such file or directory: 'objects/epsilon.pkl
目录: 前言 解释 详细解释 前言 看微信推送了一个好玩的应用强化学习dinosrun,但是在运行时,遇到了这个问题,百思不得其解: FileNotFoundError: [Errno 2] No s ...
- FileNotFoundError: [Errno 2] No such file or directory: 'traingingDigits/0_0.txt'
使用KNN进行手写体识别的时候,出现FileNotFoundError: [Errno 2] No such file or directory: 'traingingDigits/0_0.txt', ...
最新文章
- linux添加ssl信任根证书,linux系统添加根证书linux证书信任列表
- gVim 取消自动备份(Windows/Linux)
- 部署Office Web Apps Server并配置其与SharePoint 2013的集成
- 直击 Elementary OS 0.3 Freya - 下载和安装指南
- 深度 | 用代码构建机器心智,我们离这个目标还有多远?
- 9.13-15 runlevel init service
- Quantumas,作者太NB了,俺发现俺菜得跟猪一样!!!
- 中国软件开发project师之痛
- 用python输入名字并打印_python的输出与输入
- HC大会,华为联合合作伙伴发布一站式物联网IoT开发工具小熊派BearPi
- nginx master-worker进程间通信
- Glide 4.x工作总体执行流程概述
- WF本质论 OpenSesame 芝麻开门代码
- Chrome 安装Axure 插件
- 软考系统集成项目管理工程师备考经验资料分享
- android 发短信 oppo,OPPO R11短信发送失败怎么办?OPPO手机短信发送失败的解决方法...
- tolower()函数用法
- MySQL优化之执行计划
- 基于SSM的植物花草养护交流网站设计
- python连接mysql输出数据库结构docx文档
热门文章
- app上架苹果市场流程
- 360怎样修改wifi服务器,360路由器怎么重新设置? | 192路由网
- 1.什么是方法 2.方法定义俩变量求和打印 3.改进上面的 (在调用里面改值相加) 4.形参与实参 5.计算长方形周长 定义一个方法并打印出来 6.定义一个方法 计算圆的面积打印出来
- 计算机网络实验:802.3协议分析和以太网
- 【科研数据处理】[基础]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)
- 王树尧老师运筹学课程笔记 02 高等数学基础
- (已解决)网页不显示数学公式||只显示源码
- 酒与茶--网友-心香一束著
- 设计模式---004策略模式---【巷子】
- 往MYSQL中插入,读写图片!