Questions tagged [ipython]

IPython is a feature-rich interactive shell for Python, and provides a kernel for frontends such as IPython Notebook and Jupyter Notebook.

IPython provides a rich architecture for interactive computing with . It includes:


Version updates:

The IPython 3.x release series is the last where IPython is released as one big package. Starting with IPython 4.0, the parts which work for any language are called , while the parts specific to executing Python code remain as IPython.

IPython 5.0 is the last major release to support Python 2.x.


Links:

7180 questions
5
votes
1 answer

Is there any reason to use Ipyparallel for common python script (not ipython notebook) over multiprocessing module?

Is there any reason to use Ipyparallel for common python script (not ipython notebook)?
Philipp_Kats
  • 3,872
  • 3
  • 27
  • 44
5
votes
2 answers

How to have an argument possible values dependent on another argument with IPython Widgets?

Assume I have this simple function in Python: def f(gender, name): if gender == 'male': return ranking_male(name) else: return ranking_female(name) where gender belongs to ['male', 'female'] whereas name belongs to ['Adam',…
gota
  • 2,338
  • 4
  • 25
  • 45
5
votes
1 answer

reload global variables in ipython notebook

I have a module that helps me with code and global variables, and a run file on a notebook. I use from my_module import * to import it and it works. When I change function definitions on the module, they autoreload on the notebook just fine, but the…
DeanLa
  • 1,871
  • 3
  • 21
  • 37
5
votes
2 answers

Starting jupyter notebook programmatically from another notebook

Is it possible to start another notebook from the current notebook? I know how to create and save the current notebook but I cannot launch another notebook from the current one. %run does not work while starting another notebook
MARK
  • 2,302
  • 4
  • 25
  • 44
5
votes
1 answer

Prevent ipython from storing outputs in Out variable

I'm currently working with pandas and ipython. Since pandas dataframes are copied when you perform operations with it, my memory usage increases by 500 mb with every cell. I believe it's because the data gets stored in the Out variable, since this…
parchment
  • 4,063
  • 1
  • 19
  • 30
5
votes
1 answer

Copying code snippets into IPython / Jupyter Notebooks

Note, my question is specifically about Jupyter Notebooks. In addition, I don't just want to run the code, like you can get in the ipython console with %paste. I want to paste the code snippet into a cell and edit it before running. (So this is not…
michael_j_ward
  • 4,369
  • 1
  • 24
  • 25
5
votes
0 answers

Wrong sys.path in jupyter notebook when launched in a virtual environment

I created a virtual environment named sampleenv, however when I launched jupyter notebook inside sampleenv, I noticed that it is referencing/siting python packages from my another virtual environment named openfaceenv. Here's the output when calling…
bninopaul
  • 2,659
  • 4
  • 15
  • 22
5
votes
1 answer

Return value from function where ipython widgets are used to obtain input parameters

I'm trying to "widgetize" my IPython notebooks and am running into trouble with events and returning values from a function. This is the workflow I'm thinking is the best way to go: using widgets to get the input values for an arbitrary…
Benjamin Bowen
  • 121
  • 1
  • 8
5
votes
1 answer

How can I import an external C function into an IPython Notebook using Cython?

I'd like to import a C function into an IPython notebook using Cython. Currently, I'm trying to replicate the example in the Cython documentation, but I get a compilation error. My Python code (from an iPython notebook): import cython %load_ext…
Alizaybak
  • 327
  • 3
  • 8
5
votes
1 answer

Pycharm: MultipleInstanceError: Multiple incompatible subclass instances of PyDevTerminalInteractiveShell are being created

In PyCharm, if I run a script in debug mode (with debug console on), then stop at a breakpoint, and try to type something into the console, I get: MultipleInstanceError: Multiple incompatible subclass instances of PyDevTerminalInteractiveShell are…
Peter
  • 12,274
  • 9
  • 71
  • 86
5
votes
4 answers

Ipython broke: doesn't start, says missing 'pathlib2' distribution

When i execute ipython in terminal i see following error aman@ebex-MacBookPro:~/ipython_work$ ipython Traceback (most recent call last): …
aman
  • 1,875
  • 4
  • 18
  • 27
5
votes
0 answers

Jupyter Notebook loop cells

I have a question, is it posible to iterate in a loop in different cells in a notebook? for instance I have this code: for c in range(2): # Thetas thetas = np.zeros((J,I)) it = np.nditer(thetas, flags=['multi_index'],op_flags=['writeonly']) while…
user3207377
  • 95
  • 1
  • 1
  • 8
5
votes
2 answers

How do I provide inline input to an IPython (notebook) shell command?

I want to put together an IPython notebook with some shell commands and their input. In the bash prompt I can use "here-document" syntax: bash-3.2$ mysql -u root < use mydb; > show tables; > END_INPUT How do I get the same effect in…
alexis
  • 48,685
  • 16
  • 101
  • 161
5
votes
1 answer

Pandas.Dataframe.duplicated() includes missing rows as duplicates

I have a Pandas Dataframe named Merged that has an attribute named RegimentalNumber. I'm using the Pandas.Dataframe.duplicated() method to retrieve the duplicates from this dataframe like so: In [16]: Merged[Merged.RegimentalNumber.duplicated() ==…
lostsoul29
  • 746
  • 2
  • 11
  • 19
5
votes
2 answers

Python interactive REPL inside a with statement

From an python interactive session, is there a way to enter a REPL loop inside a with statement? Normally, a with statement is executed as a single block >>> >>> with app.app_context(): >>> ... # Normally this is executed as a single block, all at…
00500005
  • 3,727
  • 3
  • 31
  • 38