question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Source directory problem for notebook examples

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
clarkfitzgcommented, 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.

0reactions
clarkfitzgcommented, 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
Read more comments on GitHub >

github_iconTop Results From Across the Web

Support notebooks outside of Sphinx root directory. · Issue #297
I'm currently using nbsphinx to convert example notebooks to static ... folder with it's sphinx scripts from (jupyter notebook-)source files ...
Read more >
vscode interactive notebooks nuget directory error
Turns out, vscode interactive notebook uses the nuget configuration included in Nuget.Config found in "C:\Users{computer ...
Read more >
Data Directory in Jupyter Notebooks | by Nilo Araujo - Medium
We propose two ways to solve this problem: Using a environment variable inside a notebook; Using a data module. Environment Variable. With this ......
Read more >
Work with notebooks and other files in Databricks Repos
Learn how to work with notebooks and other files in Databricks Repos integrated with a remote Git repository.
Read more >
How To: Change the default start directory for Jupyter Notebook
By default, the start directory for Jupyter Notebook used in ArcGIS API for Python is set to the following folder: C:\Users\<User>.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found