jupyter-notebook

Fatal Error when starting jupyter notebook

扶醉桌前 提交于 2019-12-06 03:02:31
问题 Issue: I get fatal error when I run jupyter notebook in cmd.exe as administratortor in: python -m pip install jupyter out: success in: jupyter notebook out: Fatal error in launcher: Unable to create process using '"' Before you down vote please note that I've tried the following, but I get same fatal error when I try to launch jupyter notebook from cmd uninstalled jupyter and installed anadonda (https://repo.continuum.io/archive/Anaconda3-5.0.1-Windows-x86_64.exe) tried answer listed here but

nbconvert Execute Jupyter notebook from Command Line output results

。_饼干妹妹 提交于 2019-12-06 02:57:48
This question must've been asked before, but I couldn't find a right answer. I would like to run the Jupyter notebook from command line and save the result to certain files. I got this running, jupyter nbconvert --to python --execute mynotebook.ipynb >> mylog.out.log 2>&1 This command executes mynotebook.ipynb properly, but in the log file, it only contains 3 lines if the execution is successful. [NbConvertApp] Converting notebook mynotebook.ipynb to python [NbConvertApp] Executing notebook with kernel: python2 [NbConvertApp] Writing 1931 bytes to mynotebook.ipynb.py If the notebook raises

Jupyter notebook - can't import python functions from other folders

流过昼夜 提交于 2019-12-06 02:44:15
I have a Jupyter notebook, I want to use local python functions from other folders in my computer. When I do import to these functions I get this error: "ModuleNotFoundError: No module named 'xxxxxxxxxxxxx' I'm using anaconda as the python interpreter You can add a path using sys to your local module/python file. import sys sys.path.append("/path/to/file/") # path contains python_file.py import python_file If you want a more permanent solution by adding module to Anaconda path, see previous answer from cord-kaldemeyer https://stackoverflow.com/a/37008663/7019148 . Content copied below for

How to display matplotlib plots in a Jupyter tab widget?

我是研究僧i 提交于 2019-12-06 02:42:08
问题 I am having trouble displaying plots inside of Jupyter tab widgets. Consider the following snippet: import matplotlib.pyplot as plt import pandas as pd import ipywidgets as widgets import numpy as np out1 = widgets.Output() out2 = widgets.Output() data1 = pd.DataFrame(np.random.normal(size = 50)) data2 = pd.DataFrame(np.random.normal(size = 100)) with out1: fig1, axes1 = plt.subplots() data1.hist(ax = axes1) display(fig1) with out2: fig2, axes2 = plt.subplots() data2.hist(ax = axes2) display

Jupyter notebook autocomplete showing duplicate options

允我心安 提交于 2019-12-06 01:41:26
Jupyter notebook's autocomplete seems working, but somehow it will show duplicate options for the method. For example below: For each possible options, drop down menu will show 2 identical choices. Why this happen and how to fix it? Relevant Github issue: https://github.com/ipython/ipython/pull/10969 This should be fixed in Ipython 6.3 release (track milestone completion here: https://github.com/ipython/ipython/milestone/48 ) 来源: https://stackoverflow.com/questions/48009983/jupyter-notebook-autocomplete-showing-duplicate-options

IPython: How to show the same plot in different cells?

自作多情 提交于 2019-12-06 01:35:36
问题 I'm still new to IPython Notebooks, Jupyter, and Python in general. I'm creating a scatter plot in a Jupyter notebook using the following code: import numpy as np import matplotlib.pyplot as plt n = 1024 X = np.random.normal(0, 1, n) Y = np.random.normal(0, 1, n) plt.axes([0.025, 0.025, 0.95, 0.95]) plt.scatter(X, Y, s=50) plt.show() My question is, how can I get a reference to the plot object so I can use it in a different cell later on in the notebook? Additionally, I may need to modify the

Connecting Spyder to Remote Jupyter Notebook in a Docker Container

会有一股神秘感。 提交于 2019-12-06 00:39:42
I have been trying to connect Spyder to a docker container running on a remote server and failing time and again. Here is a quick diagram of what I am trying to achieve: Currently I am launching the docker container on the remote machine through ssh with docker run --runtime=nvidia -it --rm --shm-size=2g -v /home/timo/storage:/storage -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group --ulimit memlock=-1 -p 8888:8888 --ipc=host ufoym/deepo:all-jupyter so I am forwarding on port 8888. Then inside the docker container I am running jupyter notebook --no-browser --ip=0.0.0.0 --port=8888 --allow

How to change multiple interactive plots with a single input in Python

拈花ヽ惹草 提交于 2019-12-06 00:07:20
I am trying to make several interactive plots with the ipywidgets library in Jupyter Notebook. I face however one problem: I try to make multiple plots change when one single input widget changes, for example a slider. In the added MWE this is illustrated with a sine and cosine function that both depend on a single input widget that sets the amplitude of both the sine and the cosine function. Thus, if the value of the input slider is set at the value 2, the amplitude of both the sine and cosine function must inmediately follow suit. If you would run the code yourself then you will see that

interact and plotting with ipywidgets events produces many graphs

谁说胖子不能爱 提交于 2019-12-05 23:36:45
I am trying to use widget events to make an interactive graph. %matplotlib inline import numpy as np import matplotlib.pyplot as plt import ipywidgets as widgets def myplot(n): x = np.linspace(-5, 5, 30) y = x**n fig, ax = plt.subplots(nrows=1, ncols=1); ax.plot(x, y) ax.set_xlabel('x') ax.set_ylabel('y') plt.show() Interact works as expected (it changes the figure interactively): widgets.interact(myplot, n=(0,5)); However the following snippet creates several figures that appear below as you interact with the slider. n_widget = widgets.IntSlider( value=2, min=0, max=5) def on_value_change

Can't use Jupyter Notebook: jsonschema apparently missing

我怕爱的太早我们不能终老 提交于 2019-12-05 23:02:23
问题 When using a an Anaconda environment, I can't start Jupyter to work in a notebook. I can do so without the environment, but I need to be able to use the environment. Here's what I do and the errors I get: ben@ben-K60IJ:~/surveillance_sound_classifier/surveillance_sound_classifier$ source activate EECS352 discarding /home/ben/anaconda/bin from PATH prepending /home/ben/anaconda/envs/EECS352/bin to PATH (EECS352)ben@ben-K60IJ:~/surveillance_sound_classifier/surveillance_sound_classifier$