You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the code for the Real Python tutorial [Build a Maze Solver in Python Using Graphs](https://realpython.com/python-maze-solver/).
4
+
5
+
## Installation
6
+
7
+
The code requires Python 3.10 or later and depends on the NetworkX library. You can install the project into an active virtual environment by issuing the following command from the project root folder:
8
+
9
+
```sh
10
+
(venv) $ python -m pip install .
11
+
```
12
+
13
+
For development, consider installing the code in editable mode:
14
+
15
+
```sh
16
+
(venv) $ python -m pip install --editable .
17
+
```
18
+
19
+
## Running
20
+
21
+
To run the maze solver, use the `solve` command and provide the path to a maze file:
22
+
23
+
```sh
24
+
$ solve /path/to/labyrinth.maze
25
+
```
26
+
27
+
Alternatively, you can use the more explicit yet equivalent command:
28
+
29
+
```sh
30
+
$ python -m maze_solver /path/to/labyrinth.maze
31
+
```
32
+
33
+
If the command succeeds, then you should either see a rendered solution in your default web browser or a relevant error message in the console.
0 commit comments