X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=INSTALL.adoc;h=8a008d7b32960d3cf8dd0fb115808a4bf49f3670;hp=c862b0b089b4ee0bc39d7368a245bd728b3054e8;hb=569e7c5051e4e883bc83c8d11b883932082a9d97;hpb=b8dd0eb90412fe7cb062ae8838baf10446e16794 diff --git a/INSTALL.adoc b/INSTALL.adoc index c862b0b..8a008d7 100644 --- a/INSTALL.adoc +++ b/INSTALL.adoc @@ -1,22 +1,46 @@ = Installing Open Adventure = The instructions below assume your system uses Python 3 by default, -but the actual Python code in Open Adventure is 2/3 agnostic. Adjust +but the actual Python code in Open Adventure is 2/3-agnostic. Adjust the example commands below accordingly. -1. Install PyYAML for Python 3 (which requires Python 3), and libedit -(aka: editline) on your system. +1. Install PyYAML for Python 3 (which requires Python 3) and libedit +from http://thrysoee.dk/editline/ (aka: editline) on your system. ++ +On Debian and Ubuntu: `apt-get install python3-yaml libedit-dev`. ++ +On Fedora: `dnf install python3-PyYAML libedit-devel`. ++ +If you are using MacPorts on OS X: `port install py3{5,6}-yaml`, as +appropriate for your Python 3 version. ++ +You can also use pip to install PyYAML: `pip3 install PyYAML`. -On Debian and Ubuntu: 'apt-get install python3-yaml libedit-dev'. -On Fedora: 'dnf install python3-PyYAML libedit-devel'. +2. Change to the top-level directory of the source code (e.g., `cd open-adventure`). -If you are using MacPorts on OS X: 'port install py3{5,6}-yaml', as -appropriate for your Python 3 version. +3. Build with `make`. ++ +If make returns the following message: ++ +------------------------------------------------ +Traceback (most recent call last): + File "./make_dungeon.py", line 13, in + import sys, yaml +ImportError: No module named yaml +------------------------------------------------ ++ +try editing make_dungeon.py to change `#!/usr/bin/env python` to +read `#!/usr/bin/env python3` + +If you still get the error, use the following command to install yaml with pip: + +`pip install pyyaml` + +Make sure you have `pip` installed on your system. If not, you should install it first: -You can also use pip to install PyYAML: 'pip3 install PyYAML'. +https://pip.pypa.io/en/stable/installing/ -2. 'make'. -3. Optionally run a regression test on the code with 'make check'. +4. Optionally run a regression test on the code with `make check`. -4. Run the resulting 'advent' binary to play. +5. Run `./advent` to play.