Skip to content

Commit 2162708

Browse files
committed
Clarify that setting the Python version is a troubleshooting step
This groups all the Python setup description together, hopefully simplifying the process of working out which sections of these docs are needed.
1 parent 4d5275f commit 2162708

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

simulator/setting_up_simulator.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,31 @@ pip install -r competition-simulator-<version>/libraries.txt
4646
~~~~~
4747

4848

49+
### Troubleshooting: setting your version of Python
50+
51+
Sometimes Webots will not automatically detect your installed Python so we need to change it.
52+
When this happens Webots will print errors to its console and your robot will not move.
53+
54+
You will need the full path to the version of Python that you want to use.
55+
This will vary based on the system you have.
56+
One way to find the path is by launching Python and running the following code:
57+
58+
~~~~~ python
59+
import sys
60+
print(sys.executable)
61+
~~~~~
62+
63+
Once you have the path you need to enter this into the Webots settings.
64+
65+
To do this on Windows, open webots and go to the menu **Tools** &rarr; **Preferences** &rarr; **General** &rarr; **Python command** and enter the path in that box.
66+
Your Python path is likely similar to `C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\python.exe` when using Python 3.11, where `<USERNAME>` is your login.
67+
68+
On Mac you can set the path to the Python version to use via **Webots** &rarr; **Preferences** <kbd>⌘</kbd><kbd>,</kbd>.
69+
Your Python path is likely similar to `/Library/Frameworks/Python.framework/Versions/3.11/bin/python3` when using Python 3.11.
70+
71+
If you're still having problems, ask for help in [Discord][discord].
72+
73+
4974
## The world simulation {#world-simulation}
5075

5176
The simulation for the SR2024 competition will be released at Kickstart.
@@ -77,31 +102,6 @@ On recent versions of macOS you may need to give Webots permission to access the
77102
</div>
78103

79104

80-
## Changing your version of Python
81-
82-
Sometimes Webots will not automatically detect your installed Python so we need to change it.
83-
When this happens Webots will print errors to its console and your robot will not move.
84-
85-
You will need the full path to the version of Python that you want to use.
86-
This will vary based on the system you have.
87-
One way to find the path is by launching Python and running the following code:
88-
89-
~~~~~ python
90-
import sys
91-
print(sys.executable)
92-
~~~~~
93-
94-
Once you have the path you need to enter this into the Webots settings.
95-
96-
To do this on Windows, open webots and go to the menu **Tools** &rarr; **Preferences** &rarr; **General** &rarr; **Python command** and enter the path in that box.
97-
Your Python path is likely similar to `C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\python.exe` when using Python 3.11, where `<USERNAME>` is your login.
98-
99-
On Mac you can set the path to the Python version to use via **Webots** &rarr; **Preferences** <kbd>⌘</kbd><kbd>,</kbd>.
100-
Your Python path is likely similar to `/Library/Frameworks/Python.framework/Versions/3.11/bin/python3` when using Python 3.11.
101-
102-
If you're still having problems, ask for help in [Discord][discord].
103-
104-
105105
## Updates
106106

107107
Occasionally, we may release an update to the simulation.

0 commit comments

Comments
 (0)