jupyter-notebook

Jupyter notebook ImportError: No module named tornado.log

邮差的信 提交于 2019-12-06 05:25:23
I have installed jupyter and when trying to start it, I get the following error: File "/Library/Frameworks/Python.framework/Versions/2.7/bin/jupyter-notebook", line 7, in <module> from notebook.notebookapp import main File"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/notebook/__init__.py", line 25, in <module> from .nbextensions import install_nbextension File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/notebook/nbextensions.py", line 35, in <module> from tornado.log import LogFormatter ImportError: No module named tornado.log

Plotly import error for exceptions module

荒凉一梦 提交于 2019-12-06 05:19:05
问题 I have searched all over and couldn't find the solution to this problem. I am trying to import plotly in Jupyter Notebook with following code and getting the following error respectively Code: import sys print(sys.path) sys.path.append('/usr/local/lib/python2.7/dist-packages') import plotly Error: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-3-b41540b5e198> in <module>() 3 sys.path.append('/usr/local

percentage count per group and pivot with pyspark

天涯浪子 提交于 2019-12-06 04:34:28
I have dataframe with columns from and to.Both are country codes and they show starting country and destination country. +----+---+ |from| to| +----+---+ | TR| tr| | TR| tr| | TR| tr| | TR| gr| | ES| tr| | GR| tr| | CZ| it| | LU| it| | AR| it| | DE| it| | IT| it| | IT| it| | US| it| | GR| fr| Is there a way to get a dataframe that shows the percentage of each destination country per country of origin, with column all the destination country code? the percentage must be out of the total destinations by the same country of origin(row). e.g. +----+---+----+---+----+ |from| tr| it| fr| gr| +----+-

Running a Python script in Jupyter Notebook, with arguments passing

陌路散爱 提交于 2019-12-06 04:29:18
问题 I have this simple Python script which I run from my Jupyter Notebook. However the arguments I pass to it seemingly are ignored and this results in an exception: two_digits.py import sys input = sys.stdin.read() tokens = input.split() a = int(tokens[0]) b = int(tokens[1]) print(a + b) %run two_digits 3 5 ndexError Traceback (most recent call last) D:\Mint_ns\two_digits.py in <module>() 5 tokens = input.split() 6 ----> 7 a = int(tokens[0]) 8 9 b = int(tokens[1]) IndexError: list index out of

Use Jupyter Notebook on my local computer to run code on a remote computer

两盒软妹~` 提交于 2019-12-06 04:10:31
问题 I use Jupyter Notebook to run bioinformatic analyses, and I love it. However, it only really plays nice when I run it on my personal computer. However, I regularly do analysis using a remote computer with multiple cores to reduce processing time. I'd like to be able to use the Jupyter Notebook interface on my personal computer while everything is actually running on the remote computer. I generally do this via ssh access to the remote computer within the shell and execute all commands at the

How to uninstall r-essentials using conda?

本小妞迷上赌 提交于 2019-12-06 04:10:22
问题 Recently, I installed r-essentials using conda command: conda install -c r r-essentials as it is described in this url: https://anaconda.org/r/r-essentials. However, when I try to run a new R Kernel, ii fails according to this error: ...Anaconda3\R/bin/x64/Rterm.exe' is not recognized as an internal or external command, operable program or batch file. I want to remove R folder that was created after installation But I cannot find a way to remove that folder. I tried: conda uninstall r

Using ipywidgets with plotly in jupyter notebook

筅森魡賤 提交于 2019-12-06 04:09:30
I want to use the offline plotting of plotly inside a jupyter notebook and want to manipulate or redraw the plot by using widgets from ipywidgets. Unfortunately I do not manage to update the plots appropiately: from ipywidgets import widgets, HBox, Output import plotly as py from plotly.offline import iplot from IPython.display import display %matplotlib inline ip_widget = widgets.FloatSlider( value=6, min=3, max=10, step=1, description='num', continuous_update = True ) ow = Output() def response(change): with ow: iplot([{'x':list(range(int(ip_widget.value))), 'y': list(range(int(ip_widget

Jupyter Notebook Set Default Folder to Root

风格不统一 提交于 2019-12-06 03:50:17
I am using Jupyter Notebook on Windows 7, and I want to set the default foler to D: . Currently, I have the following line in my jupyter_notebook_config.py: c.NotebookApp.notebook_dir = 'D:/' When I open Jupyter Notebook, in the browser I receive the following message: 404 : Not Found You are requesting a page that does not exist! In the prompt, I get the following output: [W 14:12:45.477 NotebookApp] ipywidgets package not installed. Widgets are unavailable. [I 14:12:45.497 NotebookApp] Serving notebooks from local directory: D:/ [I 14:12:45.497 NotebookApp] 0 active kernels [I 14:12:45.497

vagrant and ubunutu: pip install jupyter error: Storing debug log for failure in /home/vagrant/.pip/pip.log

↘锁芯ラ 提交于 2019-12-06 03:37:37
I want to install jupyter on ubuntu 14.04(vagrant) with the command: sudo pip install jupyter, but there is error, could you tell me how to solve it. vagrant@vagrant-ubuntu-trusty-64:~$ pip install jupyter Downloading/unpacking jupyter Downloading jupyter-1.0.0-py2.py3-none-any.whl Downloading/unpacking ipywidgets (from jupyter) Downloading ipywidgets-6.0.0-py2.py3-none-any.whl (46kB): 46kB downloaded Cleaning up... Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2

Workaround for wrapping a JS function in python in Jupyter notebook

血红的双手。 提交于 2019-12-06 03:04:54
So in an IPython Jupyter notebook one can add JavaScript functions via the %% javascript magic cell syntax or via the Python kernel with IPython.display.HTML and one can alter Python variables in JS with IPython.notebook.kernel.execute . However, the kernel call is done when the kernel is idle. cell 1, magic cell JS to add the function. %%javascript window.act = () => IPython.notebook.kernel.execute('flag = False'); cell 2, python kernel from IPython.display import display, HTML flag = True display(HTML('''<p id="newDOMElement">New DOM element added </div> <script type="text/Javascript"> act()