jupyter-notebook

In Jupyter Lab, execute editor code in Python console

喜夏-厌秋 提交于 2019-12-22 05:42:31
问题 In Jupyter Lab, I want to send code from the editor to the Python console for execution, preferably with a keyboard shortcut. The documentation doesn't seem to offer a way to do this, but it's such a fundamental aspect of an IDE that I imagine it's probably possible. 回答1: This feature has been released now. All you need to do is Right click the script and create a console editor Copy the whole code and press shift + Enter 回答2: This is planned as a feature for the 1.0 release. See https:/

How to install Apache Toree for Spark Kernel in Jupyter in (ana)conda environment?

ぐ巨炮叔叔 提交于 2019-12-22 05:18:10
问题 I am trying to install Jupyter-support for Spark in a conda environment (which I set up using http://conda.pydata.org/docs/test-drive.html) of the anaconda distribution. I am trying to use apache toree as Jupyter Kernel for this. Here is what I did after I installed Anaconda: conda create --name jupyter python=3 source activate jupyter conda install jupyter pip install --pre toree jupyter toree install Everything worked fine until I reached the last line. There I get PermissionError: [Errno

Run Jupyter Notebook in the Background on Docker

末鹿安然 提交于 2019-12-22 04:52:55
问题 I am trying to run a jupyter notebook in the background without printing anything to the console. I found this solution in a question for bash: jupyter notebook &> /dev/null & But I am running jupyter in a docker container and want it to start in the background via CMD . How can I do the same in sh? 回答1: I got it to work using the setup from: https://github.com/jupyter/docker-stacks/tree/master/minimal-notebook the trick was to install tini and put the following code into a start-notebook.sh

Jupyter: disable restart kernel warning

£可爱£侵袭症+ 提交于 2019-12-22 04:07:57
问题 I'm using jupyter 4.1.0, and I find myself making frequent use of the "Restart & Run All" feature. Every time I use that button it displays this warning: Is there a way to disable that warning? 回答1: You can add a cell in your notebook and using the following statements: from IPython.core.display import HTML HTML("<script>Jupyter.notebook.kernel.restart()</script>") And the kernel will restart immediately. 来源: https://stackoverflow.com/questions/37472274/jupyter-disable-restart-kernel-warning

Unable to import Keras in Jupyter

痴心易碎 提交于 2019-12-21 22:50:37
问题 So I set up my virtual lan with python 3 and jupyter (with pip). All works fine but if I try to import keras it will not work in jupyter and tells module not found. But if I execute the same file (python3 test.py) in the terminal it works fine. which jupyter /usr/local/bin/jupyter which python3 /Users/niro273/Desktop/xcorp/bin/python3 If I do a pip3 list these are the results. jupyter (1.0.0) jupyter-client (5.1.0) jupyter-console (5.2.0) jupyter-core (4.3.0) Keras (2.0.8) Note- I have

Jupyter notebook: Widget Javascript not detected

北城余情 提交于 2019-12-21 17:23:48
问题 Question: I installed python3 and jupyter notebook using pip3 in MacOs 10.9. When I try to run the widget it gives error that there is no javascript widget. I have python3 and R kernels installed in Jupyter-notebook. Code: from ipywidgets import widgets from IPython.display import display text = widgets.Text() display(text) text.on_submit('hello') Error: Widget Javascript not detected. It may not be installed or enabled properly. Attempts: sudo -H pip3 install ipywidgets sudo -H pip3 install

Jupyter Notebook error during saving

这一生的挚爱 提交于 2019-12-21 17:09:12
问题 Everything used to work fine but now every time I try saving any file in Jupyter Notebook, I get the following error. URIError: URIMalformed Also the following is shown in the title bar. Last Checkpoint: 09/02/2016 Autosave Failed! How do I fix this issue? 回答1: There is a solution for the Lastpass users: https://github.com/jupyter/notebook/issues/1966 adding "localhost" to My Vault -> Account Settings -> Neverl URLS -> "Never Add Site" 回答2: I encountered this same error as well. I ended up

embedding image into jupyter notebook and exporting to HTML

余生长醉 提交于 2019-12-21 17:05:21
问题 I am running Python 3.7 on Windows using pycharm. I have a jupyter notebook and I would like to embed an image into the notebook. I know all the ways of doing standard embedding with markdown language, BUT ideally what I want is: a. Embed the image via markdown language, i.e. the notebook cell is in 'markdown' state, not 'Code' state, AND ALSO b. Have it able to export to HTML and retain that image in the HTML file. i.e. on the notebook. I want to click File -> Download as -> HTML (.html) ,

Exporting Interactive Jupyter Notebook to html

半世苍凉 提交于 2019-12-21 15:39:14
问题 The following code plots an interactive figure where I can toggle specific lines on/off. This works perfectly when I'm working in an Ipython Notebook import pandas as pd import numpy as np from itertools import cycle import matplotlib.pyplot as plt, mpld3 from matplotlib.widgets import CheckButtons import matplotlib.patches import seaborn as sns %matplotlib nbagg sns.set(style="whitegrid") df = pd.DataFrame({'freq': {0: 0.01, 1: 0.02, 2: 0.029999999999999999, 3: 0.040000000000000001, 4: 0

plotly plots in jupyter notebooks: Validation fails when saving

时光毁灭记忆、已成空白 提交于 2019-12-21 11:35:53
问题 I'am new to plotly and I'am having a problem with my plots when generating them inside jupyter notebooks. Whenever I generate a plot, evrything works fine, but when I try to save the notebook I get an error message telling me that the notebook validation failed because it's not valid under any of the given schemas (example taken straight from the plot.ly webiste). Here is an example: import plotly.plotly as py iplot([{"x": [1, 2, 3], "y": [3, 1, 6]}]) I get the following message when I try to