I want to bring nbviewer to my job. Because I am not able to share company data (place it on github), I will need to install nbviewer locally. There are instructions to set one up on Heroku but this will not work for me. Has anyone attempted this? Is it even worth the effort? Any other alternatives? Thanks.
Steps to get nbviewer running on your local machine:
Step1: Download nbviewer from github
Step2: Download nbconvert from github
Step3: Place nbconvert contents into the "nbconvert" folder inside nbviewer
Step4: Get required libraries
easy_install Flask==0.9
easy_install Flask-Markdown
easy_install requests
easy_install Pygments (comes with python xy)
easy_install Markdown==2.2.0
easy_install pylibmc==1.2.3
easy_install tornado
easy_install newrelic (failed to install optional c extension but think this is ok)
easy_install pyzmq (comes with python xy)
Step5: Edit gist.py
Comment out all these lines:
#from flask.ext.cache import Cache line 17
#from lib.MemcachedMultipart import multipartmemecached line 20
#cache = Cache(app, config=config) line 63
#@cache.cached(5*hours) line 92
#@cache.cached(5*hours) line 107
#@cache.cached(5*hours) line 112
#@cache.cached(5*hours) line 117
#@cache.cached(5*hours) line 122
#@cache.cached(5*hours) line 127
#@cache.cached(1*minutes) line 133
#@cache.memoize() line 177
#@cache.memoize(10*minutes) line 201
Step6: Run app.py
Step7: got to localhost:5000
How does one deal with authentication issues? (notebooks are in a repo that is password protected)
ERROR: Failed request: GET http svn/BizIntel/Trunk/notebook.ipynb: 401 Authorization Required
Answer: http username:password@svn/BizIntel/Trunk/notebook.ipynb
enjoy!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…