I'm new to webots program and I'm building a new robot controller, but when I hit the start simulation button, it gives me this error : WARNING: "python3.8.exe" was not found. Webots requires Python version 3.7 or 2.7 (64 bit) 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.
Asked
Active
Viewed 4,715 times
1
-
What is the 'Python command' displayed in the Webots preferences? Can you also share the controller you are trying to run? Can you run the python example controller in Webots (projects/languages/python)? – David Mansolino Apr 16 '20 at 05:36
-
I can't run the example in the project file, I'm trying to run the code provided by the Webots tutorial, the python command is python 3.8 – mohammad996 Apr 18 '20 at 01:07
1 Answers
4
The first thing I recommend to start with is to download Python 3.7. in the documentation https://cyberbotics.com/doc/guide/using-python it is claimed that Webots supports python 3.7 (I think you are using windows). Python 3.8 support is only specified for MacOS and Ubuntu. Download link for Python 3.7: https://www.python.org/ftp/python/3.7.7/python-3.7.7-amd64.exe.
When installing, be sure to specify that python should be added to the Path variable (I have circled this field in the figure below with a red rectangle). After installing python, you must restart Webots.
- Also using the Windows command line, try running Python using the "python" command, also in the settings in Webots: Tools-Preferences (see the window below) the command that runs Python on your computer is specified. The command to run Python from the command line and the command to run Python specified in Webots-Preferences must match.

V. Gai
- 450
- 3
- 9
- 30
-
+1 I got OP's error even though I had both Python 2.7.18 (as `python`) and 3.8.10 (as `python3`) accessible from my path. Changing the "Python command:" to `python3` instead of `python` fixed the error for me. – Drake P Mar 28 '22 at 23:34