I installed Sphinx in the environment of Mac OS X 10.8.5 + Python 2.7.5. You must be connected to the internet.
First, download and install ez_setup.py. Because of Mac OS X, the get command is curl instead of wget.
$ curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -o ez_setup.py
$ python ez_setup.py
If the installation fails, try running it with administrator privileges.
$ sudo python ez_setup.py
Install Sphinx with the installed easy_install. This time 1.1.3 was selected. (The latest is 1.2.)
$ easy_install sphinx
Searching for sphinx
Best match: Sphinx 1.1.3
...
Create a project directory (here "sphinx") and move the current.
$ mkdir sphinx
$ cd sphinx/
Generate a Sphinx project with sphinx-quickstart. Since this is a "trial", I answered the questions after executing sphinx-quickstart with almost the initial values (press the [Enter] key).
$ sphinx-quickstart
$ ls
Makefile build/ make.bat source/
"Index.rst" in the source directory is the reStructuredText file.
$ ls source/
_static/ _templates/ conf.py index.rst
Create HTML from a file in the source directory.
$ make html
$ ls build/html/
_sources/ genindex.html objects.inv searchindex.js
_static/ index.html search.html
Start a WWW browser (Safari in this case) and check the created HTML.
$ open /Applications/Safari.app build/html/index.html
Recommended Posts