ipython-notebook

SystemExit: 2 error when calling parse_args() in iPython Notebook

ⅰ亾dé卋堺 提交于 2019-12-08 20:16:32
问题 I'm learning to use Python and scikit-learn and executed the following block of codes (originally from http://scikit-learn.org/stable/auto_examples/document_classification_20newsgroups.html#example-document-classification-20newsgroups-py) in iPython notebook (using Python 2.7): from __future__ import print_function from optparse import OptionParser # parse commandline arguments op = OptionParser() op.add_option("--report", action="store_true", dest="print_report", help="Print a detailed

“ERROR:tornado.application:Uncaught exception GET” when starting ipython-notebook

╄→гoц情女王★ 提交于 2019-12-08 19:28:27
After installing anaconda 2.0.1 amd64 on my Windows7, I get the following error when starting ipython-notebook: ERROR:tornado.application:Uncaught exception GET /static/components/jquery-ui/th emes/smoothness/jquery-ui.min.css?v=60f0405edd95e7135ec6a0bbc36d1385 (127.0.0.1) HTTPRequest(protocol='http', host='localhost:8888', method='GET', uri='/static/c omponents/jquery-ui/themes/smoothness/jquery-ui.min.css?v=60f0405edd95e7135ec6a0 bbc36d1385', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Languag e': 'zh-CN,zh;q=0.8,en;q=0.6', 'Accept-Encoding': 'gzip,deflate,sdch', 'X-Forwar

unable to open jupyter(ipython) notebook on browser

无人久伴 提交于 2019-12-08 17:28:17
问题 I'm using python3.5 and jupyter 4.0.6 . I launched the jupyter notebook , and get the following output: [I 21:47:27.021 NotebookApp] Serving notebooks from local directory: /home/nitrous [I 21:47:27.021 NotebookApp] 0 active kernels [I 21:47:27.021 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/ [I 21:47:27.022 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [W 21:47:27.023 NotebookApp] No web browser found: could

How to show source code of a package function in IPython notebook

╄→гoц情女王★ 提交于 2019-12-08 15:29:42
问题 For teaching purposes I want an IPython notebook that displays (as output from a cell) the function source code, but I want to be able to reference this in multiple notebooks. Hence I would like to display the function code, in a similar way to using the %psource magic, but appropriately syntax highlighted. This is a similar question to this question, but I want to be able to apply it to a single function within a file, rather than to the complete file at once. Using the suggestion from the

Error “GraphViz's executables not found” when calling GraphViz layout from NetworkX in iPython notebook

帅比萌擦擦* 提交于 2019-12-08 10:04:08
问题 I received the error "InvocationException: GraphViz's executables not found, error GraphViz's executables not found" when trying to use the method graphviz_layout in my code. The code works fine when graphviz_layout is replaced by spring_layout. From the throwback exception information, it looks like it calls pydot_layout. I have the pydot module installed through Canopy's package manager, but importing it does not help. I have also pip installed graphviz and imported it with no luck. Here is

IPython notebook does not produce output

帅比萌擦擦* 提交于 2019-12-08 07:52:29
问题 I have just installed IPython 2.0 (April 2014) through Anaconda (64 bit) on a brand new pc with windows 7 (64 bit), performed the updates suggested and installed some packages with "$ conda install ". I am loading IPython notebook with firefox and chrome. they are not the default browsers, so I used the information in this answer: https://stackoverflow.com/a/15748692/2344958 When I run IPython Notebook, it presents the landing pages and open new or imported notebooks, but it does not produce

IPython notebook in zc.buildout not using eggs path

倖福魔咒の 提交于 2019-12-08 07:40:56
问题 I've build an environment with zc.buildout including IPython script. My problem is simple: if I launch IPython in console, everything is OK and I get all my eggs in sys.path but if I launch IPython notebook, I only get default system path. Is there any way to include all my eggs while starting notebook? Regards, Thierry 回答1: So, I guess somewhere in the notebook startup a process is forked, which means sys.path will get reset and buildout's tricks won't help. I solved the problems as follows,

Showing assignment results in IPython notebook?

霸气de小男生 提交于 2019-12-08 04:54:49
问题 I am writing a chain of equations/assignments from a heat transfer problem in ipython notebook (I am new to that one), like this: # nominal diameter d=3.55 # m # ambient temperature T0=15 # C # surface temperature Tw=300 # C # average film temperature Tm=(T0+Tw)/2+273.15 # K! # expansion coefficient, $$\beta=1/T$$ for ideal gas beta=1./Tm # temperature difference dT=Tw-T0 # C or K Is there a way to echo each assignment, so that those (mostly computed) values are shown? I am aware of the %whos

Problems setting up a new theme in Ipython?

馋奶兔 提交于 2019-12-08 03:29:47
问题 I would like to use another theme for Ipython notebook so I following this instructions the problem is I'm in OSX and I dont have the wget, I installed it homebrew. Could somebody help me to set ipython notebooks in a dark theme?. I tried this: brew /Users/user/.ipython/profile_notebooks/static/custom/custom.css https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/base16-ocean-dark.css 回答1: You can do it with curl or by manually downloading the theme. I have given steps

“ERROR:tornado.application:Uncaught exception GET” when starting ipython-notebook

孤者浪人 提交于 2019-12-08 03:26:07
问题 After installing anaconda 2.0.1 amd64 on my Windows7, I get the following error when starting ipython-notebook: ERROR:tornado.application:Uncaught exception GET /static/components/jquery-ui/th emes/smoothness/jquery-ui.min.css?v=60f0405edd95e7135ec6a0bbc36d1385 (127.0.0.1) HTTPRequest(protocol='http', host='localhost:8888', method='GET', uri='/static/c omponents/jquery-ui/themes/smoothness/jquery-ui.min.css?v=60f0405edd95e7135ec6a0 bbc36d1385', version='HTTP/1.1', remote_ip='127.0.0.1',