Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/2292#issuecomment-54675476
When I tried this, I got a lot of warnings saying that Sphinx couldn't
import the PySpark modules:
```
[joshrosen python (9081ead...)]$ make html
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.2.2
loading pickled environment... done
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 3 changed, 0 removed
reading sources... [100%] pyspark.sql
/Users/joshrosen/Documents/spark/docs/api/python/pyspark.rst:16: WARNING:
autodoc: failed to import module u'pyspark'; the following exception was raised:
Traceback (most recent call last):
File
"/Users/joshrosen/anaconda/lib/python2.7/site-packages/sphinx/ext/autodoc.py",
line 335, in import_object
__import__(self.modname)
ImportError: No module named pyspark
/Users/joshrosen/Documents/spark/docs/api/python/pyspark.mllib.rst:10:
WARNING: autodoc: failed to import module u'pyspark.mllib.classification'; the
following exception was raised:
Traceback (most recent call last):
File
"/Users/joshrosen/anaconda/lib/python2.7/site-packages/sphinx/ext/autodoc.py",
line 335, in import_object
__import__(self.modname)
ImportError: No module named pyspark.mllib.classification
```
I guess this is because `$SPARK_HOME/python/` isn't on the default
`PYTHONPATH`.
When I do
```
export PYTHONPATH=../../../python/
```
it picks up the imports and runs.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]