How to set the matplotlib figure default size in ipython notebook?

I use "$ipython notebook --pylab inline" to start the ipython notebook. The display matplotlib figure size is too big for me, and I have to adjust it manually. How to set the default size for...

ImportError: No module named matplotlib.pyplot

I am currently practicing matplotlib. This is the first example I practice. #!/usr/bin/python import matplotlib.pyplot as plt radius = [1.0, 2.0, 3.0, 4.0] area = [3.14159, 12.56636, 28.27431,...

save a pandas.Series histogram plot to file

In ipython Notebook, first create a pandas Series object, then by calling the instance method .hist(), the browser displays the figure. I am wondering how to save this figure to a file (I mean not...

ipynb import another ipynb file

Interactive Python (ipython) is simply amazing, especially as you are piecing things together on the fly... and does it in such a way that it is easy to go back. However, what seems to be...

IPython Notebook Tab-Complete -- Show Docstring

I just upgraded to IPython 2.0.0 and the behavior of tab-complete seems to have changed. (Using pyreadline 2.0, which according to this question might matter). Formerly, if I hit TAB after...

How can I open an IPython notebook without the output?

I have an IPython notebook where I've accidentally dumped a huge output (15 MB) that crashed the notebook. Now when I open the notebook and attempt to delete the troublesome cell, the notebook...

How to call module written with argparse in iPython notebook

I am trying to pass BioPython sequences to Ilya Stepanov's implementation of Ukkonen's suffix tree algorithm in iPython's notebook environment. I am stumbling on the argparse component. I have...

ipython notebook is not updating when I change my code

So, I ran into a weird issue using an ipython notebook and not sure what to do. Normally, when I run a part of the code, if there is an error, I would trace it back, fix it, and then re-run the...

Cannot execute code in some of Jupyiter ipython notebook cells

Any cells in Jupyter which have In [*] in front of them are not executing in Jupyter notebook. See image below: I even restarted the kernel, without any improvement of the situation. Previous...

Folium map not displaying

Running on canopy version 1.5.5.3123 With; Folium Version: 0.1.2, Build: 1 The following code; import folium import pandas as pd LDN_COORDINATES = (51.5074, 0.1278) from IPython.display import...

IPython Notebook and SQL: 'ImportError: No module named sql' when running '%load_ext sql'

Just set up an IPython Notebook on Ubuntu 16.04 but I can't use %load_ext sql. I get: ImportError: No module named sql I've tried using pip and pip3 with and without sudo to install ipython-sql....

Passing command line arguments to argv in jupyter/ipython notebook

I'm wondering if it's possible to populate sys.argv (or some other structure) with command line arguments in a jupyter/ipython notebook, similar to how it's done through a python script. For...

Problems importing imblearn python package on ipython notebook

I installed https://github.com/glemaitre/imbalanced-learn on windows powershell using pip install, conda and github. But when I'm on iPython notebook and I tried to import the package using: from...

How to disable password request for a Jupyter notebook session?

I have been launching Jupyter Notebook for years using the following command: jupyter-notebook --port=7000 --no-browser --no-mathjax When I try to open the jupyter on the browser it ask me for a...

Download data from a jupyter server

I'm using ipython notebook by connecting to a server I don't know how to download a thing (data frame, .csv file,... for example) programatically to my local computer. Because I can't specific...

Argparse in iPython notebook: unrecognized arguments: -f

I am trying to pass a .py file to ipython notebook environment. I have never had to deal directly with argparse before. How do I rewrite the main() function? I tried to delete the line of def...

Remote access Jupyter notebook from Windows?

I usually access Jupyter notebook running on Linux from Mac OS X via port forwarding like following: https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh Is it possible to do...

Package develop mode avoid jupyter kernel restart

I am working on a python package as a developper. The package is stored in a git repo and I use a local branch to debug/fix functionnalities of this package. To test the corrections I make to the...

How To resolve "NameError: name 'export_graphviz' is not defined"

export_graphviz is not defined error!! Used the following codes in Jupyrer notebook Python 3.x `def show_tree (tree, features, path): f = io.StringIO() export_graphviz(tree,...

Install jupyterlab in pip3 throws 'TypeError: expected string or bytes-like object'

Background I was trying to install Jupyter Lab using pip3 install jupyterlab, and it threw the same error. I did not figure it out. Found a workaround using pip2 install jupyterlab -- it worked,...

Python: why do I get an error when I import geopandas?

I try to import geopandas in my jupyter notebook. import geopandas as gp and I get the following error: ImportError:...

Can't run turtle on jupyter notebook (turtle graphic window not responding)

First Question I was doing an example from ThinkPython 2e Chapter 4 Case Study: Interface Design, when I stumbled upon turtle module. I use jupyter notebook as an IDE to do exercise. Here's the...

ImportError: cannot import name 'rcParams' from 'matplotlib'

I have tried to uninstall and reinstall matplotlib in my tf-gpu enviornment I made but I keep getting this error: ImportError: cannot import name 'rcParams' from 'matplotlib' This is the entire...

converting from .py to .ipynb

I wrote a juypter notebook that has been converted to .py somehow. I would like it back in the original format. Does anyone know how to do that? There is a previous stack overflow question about...

Stable Baselines doesn't work with tensorflow

So I recently got back into machine learning, and decided to start the Kaggle course for "ConnectX" (https://www.kaggle.com/learn/intro-to-game-ai-and-reinforcement-learning). I am trying to do...

Running Jupyter Notebook on AWS Lambda

I am trying to run Jupyter Notebook on AWS Lambda, created a layer with all the dependencies, the jupyter notebook is a simple code which pulls a csv file from amazon S3 and displays the data as...

Direct communication between Javascript in Jupyter and server via IPython kernel

I'm trying to display an interactive mesh visualizer based on Three.js inside a Jupyter cell. The workflow is the following: The user launches a Jupyter notebook, and open the viewer in a...

Multiple videos side-by-side with IPython Display

I have been using the useful answer suggested in this StackOverflow post to view multiple videos at once in Jupyter Notebook. Essentially, HTML doesn't seem to be working but IPython does so...

What is the difference between `jupyter notebook` and `jupyter server`?

Running jupyter notebook and jupyter server give me very similar results and the descriptions are also quite similar. ❯ jupyter notebook -h The Jupyter HTML Notebook. This launches a Tornado...

Cannot pip install mediapipe on Macos M1

Hello fellows I'm using mac air with M1 chip My env sets like (CV) san  ~/work/python  conda list # packages in environment at /Users/san/miniforge3/envs/CV: # # Name ...