Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fresh installation of sphinx-quickstart fails

Trying to get it going with Sphinx for the first time, with a clean Sphinx 1.1.3 installation, and shinx-quickstart fails. Should there be any dependencies installed? I tried to pip --force-reinstall sphinx but the result is the same.

  myhost:doc anton$ sphinx-quickstart    Traceback (most recent call last):   File "/usr/local/bin/sphinx-quickstart", line 8, in <module>     load_entry_point('Sphinx==1.1.3', 'console_scripts', 'sphinx-quickstart')()   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 318, in load_entry_point     return get_distribution(dist).load_entry_point(group, name)   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2221, in load_entry_point     return ep.load()   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1954, in load     entry = __import__(self.module_name, globals(),globals(), ['__name__'])   File "/Library/Python/2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/quickstart.py", line 19, in <module>     from sphinx.util.osutil import make_filename   File "/Library/Python/2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/util/__init__.py", line 25, in <module>     from docutils.utils import relative_path   File "/Library/Python/2.7/site-packages/docutils-0.9-py2.7.egg/docutils/utils/__init__.py", line 19, in <module>     from docutils.io import FileOutput   File "/Library/Python/2.7/site-packages/docutils-0.9-py2.7.egg/docutils/io.py", line 18, in <module>     from docutils.error_reporting import locale_encoding, ErrorString, ErrorOutput   File "/Library/Python/2.7/site-packages/docutils-0.9-py2.7.egg/docutils/error_reporting.py", line 47, in <module>     locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 496, in getdefaultlocale     return _parse_localename(localename)   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 428, in _parse_localename     raise ValueError, 'unknown locale: %s' % localename    ValueError: unknown locale: UTF-8 
like image 296
Anton Arhipov Avatar asked Jun 06 '12 20:06

Anton Arhipov


People also ask

How do I know which Sphinx I have?

The question is "how to check sphinx version?" which can be found from the command line with "searchd" on the Sphinx server. The "searchd" response will include something like "Sphinx 2.2. 9-id64-release (rel22-r5006)". This assumes you're running a x86-64 version.

What is Sphinx build?

sphinx-build generates documentation from the files in <sourcedir> and places it in the <outputdir> . sphinx-build looks for <sourcedir>/conf.py for the configuration settings. sphinx-quickstart(1) may be used to generate template files, including conf.py . sphinx-build can create documentation in different formats.


1 Answers

I was getting the same issue in Mac OS X Snow Leopard. It seems to be an issue with Terminal.app.

Please add the following to your $HOME/.bash_profile

export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 

Do

source $HOME/.bash_profile 

and try. This will solve the issue.

like image 186
jainbasil Avatar answered Sep 25 '22 01:09

jainbasil