当webots报错找不到WARNING: “python.exe“ was not found.

当你的webots报错

WARNING: "python.exe" was not found.
Webots requires Python version 3.9, 3.8 or 3.7 from python.org in your current PATH.
To fix the problem, you should:
1. Check the Python command set in the Webots preferences.
2. Check the COMMAND set in the [python] section of the runtime.ini file of your controller program if any.
3. Fix your PATH environment variable to use the required Python 64 bit version (if available).
4. Install the required Python 64 bit version and ensure your PATH environment variable points to it.

此时,你需要先下载python安装包,python官网:Download Python | Python.org

然后找到路径,这里以python3.9为例

C:\Users\YourUsername\AppData\Local\Programs\Python\PythonXX

将这添加至webots工具下面有个首选项

改成如图所示:

当然也可以:

添加 Python 路径到 PATH 环境变量

  • 右键点击“此电脑”或“计算机”图标,然后选择“属性”。
  • 点击“高级系统设置”,然后点击“环境变量”按钮。
  • 在“系统变量”部分找到并选择 Path,然后点击“编辑”按钮。
  • 点击“新建”,并添加 Python 的安装路径,例如 C:\Users\YourUsername\AppData\Local\Programs\Python\Python39
  • 再次点击“新建”,并添加 Python 的 Scripts 目录,例如 C:\Users\YourUsername\AppData\Local\Programs\Python\Python39\Scripts
  • 8
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值