jupyter-notebook

Jupyter notebook, ImportError: No module named pylab

爷,独闯天下 提交于 2019-12-11 13:16:52
问题 I am a ubuntu user, and I have install python 2.7.9 on my computer. In order to use jupyter notebook, I down load anaconda2. After my installation, I find after entering the command 'jupyter notebook', my browser will open jupyter notebook, but I can't find new python2, so I went to the https://ipython.readthedocs.org/en/latest/install/kernel_install.html Use the following commands: conda create -n ipykernel_py2 python=2 ipykernel source activate ipykernel_py2 python -m ipykernel install -

bokeh 0.12.10 not rendering Segments on GMapPlot

╄→гoц情女王★ 提交于 2019-12-11 12:35:14
问题 I am trying to display line segments on a map using GMapPlot. The lines flashes in red and then disappears, in jupyter notebook. This is my code (some decimals left out): map_options = GMapOptions(lat=37.88, lng=-122.23, map_type="roadmap", zoom=10) plot = GMapPlot( x_range=DataRange1d(), y_range=DataRange1d(), map_options=map_options ) source = ColumnDataSource( data = dict( y=[ 37.762260 ], x=[-121.96226], ym01=[37.762290 ], xm01=[-121.96189 ] ) segment = Segment(x0="x", y0="y", x1="xm01",

How to display two local images side by side in jupyter?

梦想的初衷 提交于 2019-12-11 12:18:24
问题 I want to display two images, that I have them saved locally , in one single makedown cell side-by-side ? I found previous post but it uses HTML() not Image() method. The way I tried was: from IPython.core.display import Image, display display(Image('/whateverfile/counts1.png',width=100,height=100), Image('/whateverfile/counts2',width=100, height=100)) But that did not work. Any ideas how to solve this? Thanks 回答1: from IPython.display import HTML, display display(HTML("<table><tr><td><img

Error while uploading Networkit python module with Jupyter notebook

倖福魔咒の 提交于 2019-12-11 09:49:48
问题 I installed the Networkit module with conda install -c vgauthier networkit . If I import it in a notebook ( import networkit as nk ) I get this error: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-2-a4c0096fb06c> in <module>() ----> 1 import networkit as nk //anaconda/envs/py36/lib/python3.6/site-packages/networkit/__init__.py in <module>() 41 # local imports 42 from . import stopwatch ---> 43 from .

Deep Learning Virtual Machine can't run jupyter “No such notebook dir: ''/dsvm/Notebooks''”

南笙酒味 提交于 2019-12-11 09:03:22
问题 I've set up a vm with Deep Learning Virtual Machine (Microsoft Azure). Normally, I connect to the vm thanks to ssh etc Then I run jupyter by writing jupyter notebook --no-browser . But this time I have can't run jupyter notebook because there is this message Bad config encountered during initialization: "No such notebook dir: ''/dsvm/Notebooks''" How can I fix that ? Thanks for your help ! 回答1: I presume you are trying to run Jupyter Notebook and with that goal in mind, I suggest you follow

matplotlib - ImportError: No module named _tkinter

我的未来我决定 提交于 2019-12-11 08:45:13
问题 I have a simple notebook with the following code: %matplotlib inline However, when running it I get the following error: ImportError: No module named _tkinter I have another notebook in the same project, and that one is able to run the statement without issue. The data science experience is a managed service so you don't have root access to install _tkinter. Full stacktrace: ImportErrorTraceback (most recent call last) <ipython-input-43-5f9c00ae8c2d> in <module>() ----> 1 get_ipython().magic

dataframe,Describe() function on spark 2.3.1 is throwing Py4JJavaError

ε祈祈猫儿з 提交于 2019-12-11 08:37:42
问题 I am using Spark 2.3.1 and python 3.6.5 on ubuntu. While running a dataframe.Describe() function I am getting below error on Jupyter Notebook. --------------------------------------------------------------------------- Py4JJavaError Traceback (most recent call last) <ipython-input-19-ea8415b8a3ee> in <module>() ----> 1 df.describe() ~/spark-2.3.1-bin-hadoop2.7/python/pyspark/sql/dataframe.py in describe(self, *cols) 1052 if len(cols) == 1 and isinstance(cols[0], list): 1053 cols = cols[0] ->

Access to a MySQL database via Jupyter Notebook w/ Python3

家住魔仙堡 提交于 2019-12-11 08:02:44
问题 I needed access a MySQL database via Jupyter Notebook, on which I run Python 3.6 (Anaconda install). It's a linear workflow, extracting data from the DB and manipulating it in Python/Pandas. No need for an ORM, a simple connector should do. However, the widely referenced MySQLdb package doesn't work with Python 3.x. What are the alternatives? 回答1: The recommended installation modality for Jupyter on Ubuntu is Anaconda, so the appropriate package manager is conda. Installation via pip/pip3 or

Find an hamiltonian path inside the Petersen subgraph

送分小仙女□ 提交于 2019-12-11 07:44:39
问题 I am starting to work with IDE Jupyter && Python 3.6 and a question has arisen. I have to draw through the IDE, a Hamiltonian path in the Petersen subgraph, but I do not know how to do it. I show information about said graph: Graph of Petersen: https://en.wikipedia.org/wiki/Petersen_graph Hypohamiltonian graph: https://en.wikipedia.org/wiki/Hypohamiltonian_graph Any idea of how you can make the comments? Thank you very much. 回答1: To compute the Hamiltonian graph in Petersen graph we can use

Multivariate Breusch Godfrey Lagrange Multiplier tests in Python

蓝咒 提交于 2019-12-11 07:34:47
问题 I understand that in the package statsmodel has many statistical functions that enable one to test for many issues including Breusch Godfrey Lagrange test as described here However, as far as I am concerned this only do the job for univariate case and not the multivariate case. For example, consider I have a 2 diminsional dataset say data from statsmodels.tsa.api import VAR import statsmodels.api as sm,statsmodels as sm1 data= np.random.random((108, 2)) Model=VAR(data) results = Model.fit(1)