Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source directory problem for notebook examples #1249

Closed
Padarn opened this issue Dec 18, 2013 · 11 comments

Comments

Projects
None yet
4 participants
@Padarn
Copy link
Contributor

commented Dec 18, 2013

I had some trouble building the docs using

make html

from the /docs directory. The problem seemed to come from the file 'tools/nbgenerate.py', which has the line

SOURCE_DIR = ("/home/skipper/statsmodels/statsmodels-skipper/examples/"
          "notebooks")

Obviously the first directory didn't exist for me, which caused an error.

Current version: 0.6.0.dev-b2c35b4

@josef-pkt

This comment has been minimized.

Copy link
Member

commented Dec 23, 2013

Should be replaced by relative path, but I haven't set up nbconvert to test this

@Padarn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 23, 2013

I do have nbconvert set up, but couldn't quite figure out what the relative paths should be, so I'll leave this to someone who knows what they are doing.

@clarkfitzg

This comment has been minimized.

Copy link

commented Jul 29, 2014

+1 Same issue here when trying to build docs.

@jseabold

This comment has been minimized.

Copy link
Member

commented Jul 29, 2014

PR would be welcome here.

jseabold added a commit to jseabold/statsmodels that referenced this issue Jul 29, 2014

@Padarn

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2014

Will try do one later today.

@jseabold

This comment has been minimized.

Copy link
Member

commented Jul 29, 2014

Thanks I made one already

@Padarn

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2014

Ah okay cool.

On Wed, Jul 30, 2014 at 6:36 AM, Skipper Seabold notifications@github.com
wrote:

Thanks I made one already


Reply to this email directly or view it on GitHub
#1249 (comment)
.

@josef-pkt

This comment has been minimized.

Copy link
Member

commented Jul 30, 2014

can any of you try the relative path in #1854 ?
I don't know if I will be able to check this.

@clarkfitzg

This comment has been minimized.

Copy link

commented Jul 30, 2014

I'll try it today.

On Wednesday, July 30, 2014, Josef Perktold notifications@github.com
wrote:

can any of you try the relative path in #1854
#1854 ?
I don't know if I will be able to check this.


Reply to this email directly or view it on GitHub
#1249 (comment)
.

@clarkfitzg

This comment has been minimized.

Copy link

commented Jul 30, 2014

The relative path in #1854 works for me.

I'm using Anaconda and ended up having to do $ export PYTHONPATH="/Users/clark/statsmodels before building docs since it was unable to import statsmodels.compat.

After that the docs start building until I get the following error. Not sure what it means to have all these cells with exceptions also.

~/statsmodels/docs $ make html
# generate the examples rst files
Generating reST from examples folder
#../tools/examples_rst.py
Generating notebooks from examples/notebooks folder
../tools/nbgenerate.py
Writing  categorical_interaction_plot
ran notebook
    ran   3 cells
    there were no errors in run_cell
    all code executed in the notebook as expected
/Users/clark/anaconda/lib/python2.7/site-packages/IPython/nbconvert/filters/markdown.py:78: UserWarning: Node.js 0.9.12 or later w
asn't found.
Nbconvert will try to use Pandoc instead.
  "Nbconvert will try to use Pandoc instead.")
Writing  contrasts
ran notebook
    ran  26 cells
    there were no errors in run_cell
      2 cells have exceptions in their output

...

Writing  wls
ran notebook
    ran   9 cells
    there were no errors in run_cell
      9 cells have exceptions in their output
Generating datasets from installed statsmodels.datasets
../tools/dataset_rst.py
Traceback (most recent call last):
  File "../tools/dataset_rst.py", line 8, in <module>
    import statsmodels.api as sm
  File "/Users/clark/statsmodels/statsmodels/api.py", line 16, in <module>
    from .tsa import api as tsa
  File "/Users/clark/statsmodels/statsmodels/tsa/api.py", line 1, in <module>
    from .ar_model import AR
  File "/Users/clark/statsmodels/statsmodels/tsa/ar_model.py", line 16, in <module>
    from statsmodels.tsa.kalmanf.kalmanfilter import KalmanFilter
  File "/Users/clark/statsmodels/statsmodels/tsa/kalmanf/__init__.py", line 1, in <module>
    from .kalmanfilter import KalmanFilter
  File "/Users/clark/statsmodels/statsmodels/tsa/kalmanf/kalmanfilter.py", line 33, in <module>
    from . import kalman_loglike
ImportError: cannot import name kalman_loglike
make: *** [html] Error 1
@clarkfitzg

This comment has been minimized.

Copy link

commented Jul 30, 2014

Googled my error and came across an old thread. I hadn't built statsmodels in place yet-

~/statsmodels $ python setup.py build_ext --inplace

Builds fine now.

@jseabold jseabold closed this in 85c2e2a Aug 1, 2014

josef-pkt added a commit that referenced this issue Aug 1, 2014

Merge pull request #1854 from jseabold/fix-path
BLD: Don't hard-code path for building notebooks. Closes #1249

PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this issue Sep 2, 2014

PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this issue Sep 2, 2014

Merge pull request statsmodels#1854 from jseabold/fix-path
BLD: Don't hard-code path for building notebooks. Closes statsmodels#1249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.