Skip to content

Commit 5037703

Browse files
committed
Improve doc
Signed-off-by: Terence Parr <[email protected]>
1 parent 9802473 commit 5037703

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ $ pip install antlr4-tools
1010

1111
That creates `antlr4` and `antlr4-parse` executables. On Windows, of course, this doesn't just work. You need to add the `...\local-packages\python38\scripts` dir to your `PATH`, which itself might require a fun reboot or perhaps reinstall of the OS. haha.
1212

13+
### Windows-specific issues
14+
15+
On Windows, the `pip` command doesn't just work---you need to add the `...\local-packages\python38\scripts` dir to your `PATH`, which itself might require a fun reboot. If you use WSL on Windows, then the pip install will also properly at the scripts directly (if you run from bash shell).
16+
17+
18+
1. Go to the Microsoft Store
19+
2. Search in Microsoft Store for Python
20+
3. Select the newest version of Python (3.10).
21+
4. Click the "Get" button. Store installs python and pip at "c:\Users...\AppData\Local\Microsoft\WindowsApps\python.exe" and "c:\Users...\AppData\Local\Microsoft\WindowsApps\pip.exe", respectively. And, it updates the search path immediately with the install.
22+
5. Open a "cmd" terminal.
23+
6. You can now type "python" and "pip", and "pip install antlr4-tools". 7. Unfortunately, it does not add that to the search path.
24+
7. Update the search path to contain `c:\Users...\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p8\LocalCache\local-packages\Python310\Scripts`. You may need to install MSYS2, then do a `find /c/ -name antlr4.exe 2> /dev/null` and enter that path.
25+
8. Or, you can set up an alias to antlr4.exe on that path.
26+
27+
The good news is that the ANTLR4 Python tool downloads the ANTLR jar in a standard location, and you don't need to do that manually. It's also possible to go in a browser, go to python.org, and download the python package. But, it's likely you will need to update the path for antlr4.exe as before.
28+
1329
## First run will install Java and ANTLR
1430

1531
If needed, `antlr4` will download and install Java 11 and the latest ANTLR jar:

0 commit comments

Comments
 (0)