[Numpy-discussion] numpy-docs and sphinx

Pauli Virtanen pav@iki...
Mon Nov 10 11:38:28 CST 2008


Hi,

Mon, 10 Nov 2008 08:42:16 +0100, Nils Wagner wrote:
> I tried to build the NumPy Reference Guide.
> 
> svn/numpy-docs > make html
> mkdir -p build
> ./ext/autosummary_generate.py source/reference/*.rst \
>          -p dump.xml -o source/reference/generated
> Traceback (most recent call last):
>    File "./ext/autosummary_generate.py", line 18, in ?
>      from autosummary import import_by_name
>    File
> "/data/home/nwagner/svn/numpy-docs/ext/autosummary.py", line 59, in ?
>      import sphinx.addnodes, sphinx.roles, sphinx.builder
>    File
> "/data/home/nwagner/local/lib/python2.5/site-packages/
Sphinx-0.5dev_20081110-py2.5.egg/sphinx/__init__.py",
> line 70
>      '-c' not in (opt[0] for opt in opts):
>                            ^
> SyntaxError: invalid syntax
> make: *** [build/generate-stamp] Fehler 1
> 
> How can I fix that problem ?

I don't get this error. 

But I'll try to guess -- the native Python version installed on your 
machine is 2.3, which does not support generator expressions, which 
causes a syntax error. I believe you set PYTHONPATH manually, so Python 
2.3 programs will try to look modules in your local/ 2.5 site-packages. 

autosummary_generate.py above probably runs under Python 2.3 -- you 
should be able to fix this by changing "python" to "python2.5" on the 
first line of autosummary_generate.py, or editing the makefile so that 
python2.5 is explicitly used.

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list