jupyter-notebook

Importing pyplot in a Jupyter Notebook

怎甘沉沦 提交于 2019-12-11 01:22:04
问题 Running Python 2.7 and trying to get plotting to work the tutorials recommend the below command. from matplotlib import pyplot as plt Works fine when run from the command line python -c "from matplotlib import pyplot as plt" but I get an error when trying to run it inside a Jupyter Notebook. --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-21-1d1446f6fa64> in <module>() ----> 1 from matplotlib import

Jupyter Notebooks: nbconvert configurations being picked up in jupyter_notebook_config.py file?

限于喜欢 提交于 2019-12-11 01:17:52
问题 I have a question, the following two lines, from a config file, are configuration options for nbconvert (http://nbconvert.readthedocs.io/en/latest/config_options.html) Note that they are note listed under notebook configuration options (http://jupyter-notebook.readthedocs.io/en/latest/config.html) c.TemplateExporter.template_path = ['.', "/Users/williamhenry/Library/Jupyter/templates"] c.TemplateExporter.template_file = 'printviewlatex' However, the only way I can actually get these

Rcpp jupyter notebooks

a 夏天 提交于 2019-12-11 01:14:27
问题 I have installed Rcpp in the R console with this command that until now ussually works for installing packages to run on jupyter notebooks: install.packages('Rcpp', '/home/user/anaconda3/lib/R/library/') Then in the console I do: library(Rcpp) evalCpp("2+2") and it works, but when I do the same on Jupyter notebooks it does not work, giving me this error message: /home/tyatabe/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++ -I/home/tyatabe/anaconda3/lib/R/include -DNDEBUG -I'/home/tyatabe

Copy data from Jupyter notebook

限于喜欢 提交于 2019-12-11 01:08:04
问题 I would like to copy and paste data from a Jupyter notebook. As per the following example which includes the In and Out elements. When trying to copy this data I am currently unable to select the In and Out elements as these are not contained in the cell data. In [23]: df.index.slice_indexer(start_remove, end_remove) Out[23]: slice(36, 85, None) This image shows the In and Out elements as well as the cells. I want to copy and paste all of this. 回答1: Less ugly hack: You can do this in console

Not able to import tensorflow_datasets module in jupyter notebook

时光怂恿深爱的人放手 提交于 2019-12-11 01:04:59
问题 I am trying tensorflow course from Udacity which uses google colab to write/run the code. But I want to run the code on my local machine and hence have created a new environment to run the code , but am unable to import tensorflow_dataset into the tensorflow environment . I have tried searching for the module from the anaconda navigator to install it in tensorflow environment but anaconda navigator does not provide the tensorflow datasets module. From cmd (command prompt) I tried to execute

removing certain cells via tags fails due to wrong type

我怕爱的太早我们不能终老 提交于 2019-12-11 00:49:03
问题 I want to hide certain parts of a jupyter notebook and came across tags which can achieve this. I've tagged the cells with remove_cell in my notebook an tried to run $ jupyter nbconvert test.ipynb --TagRemovePreprocessor.remove_input_tags="{'remove_cell'}" however I always get the following error: traitlets.traitlets.TraitError: The 'remove_input_tags' trait of a TagRemovePreprocessor instance must be a set, but a value of type 'unicode' (i.e. u'{remove_cell}') was specified. I've tried to

Run jupyter notebook in incognito window

五迷三道 提交于 2019-12-11 00:47:26
问题 On executing the command jupyter notebook , notebook opens on Mozilla Firefox. How to open notebook on incognito mode of Mozilla Firefox from command line? 回答1: Typically Jupyer opens on http://localhost:8888 all you need to do is copy that url and open it yourself in an incognito Firefox session. 回答2: In your config add the following to set the default browser to a private firefox (adapted from here and parameters from there): jupyter_notebook_config.py [...] ## Specify what command to use

How to define the default value of a Slider widget on ipywidgets?

谁说胖子不能爱 提交于 2019-12-11 00:34:57
问题 On a Jupyter Notebook and using ipywidgets I can create sliders using the compact version import ipywidgets as ip def f(x): print(x) ip.interact(f, x = (0, 1, 1)) The slider's default value is 0 but I would like to make it 1. How can I do this? 回答1: The widget abbreviations (using tuples to request sliders, etc.) only expose a small subset of the options that can be passed to a widget. Default values come from the default value in the function definition if available, or the center of the

after installing jupyter locally, I can't run jupyter notebook

混江龙づ霸主 提交于 2019-12-11 00:15:23
问题 On linux redhat: I tried to install jupyter locally: $ pip install jupyter --user and it seems as everything was installed properly... But - I cannot runt jupyter notebook , nor ~/.local/bin/jupyter notebook Why? The installation... $ pip install jupyter --user Collecting jupyter Using cached jupyter-1.0.0-py2.py3-none-any.whl Requirement already satisfied: ipywidgets in ~/.local/lib/python2.7/site-packages (from jupyter) Requirement already satisfied: notebook in ~/.local/lib/python2.7/site

No module named 'pandas' - Jupyter, Python3 Kernel, Tenserflow through Docker

て烟熏妆下的殇ゞ 提交于 2019-12-11 00:01:44
问题 I have a Docker container running from tensrflow with Jupyter (Python 3 Kernel) image: erroneousboat/tensorflow-python3-jupyter This works great and I can access the jupyter notebook from http://DOCKER_IP:8888 My only issue is that pandas library is not installed. So, I tried to install it on my own. I opened up the docker quickstart terminal and ran: docker exec CONTAINER_ID apt-get update docker exec CONTAINER_ID apt-get install -y python3-pandas The installation succeeds, and yet I still