Is there a way to change the config file to make jupyter qtconsole run the following command on startup?:
%matplotlib inline
Is there a way to change the config file to make jupyter qtconsole run the following command on startup?:
%matplotlib inline
Add this line to the ipython_config.py
file (not the ipython_qtconsole_config.py
file):
c.InteractiveShellApp.matplotlib = 'inline'
In your ipython_config.py
file you can specify commands to run at startup (including magic % commands) by setting c.InteractiveShellApp.exec_lines
. For example,
c.InteractiveShellApp.exec_lines = """
%matplotlib inline
%autoreload 2
import your_favorite_module
""".split('\n')
ipython_config.py
is, by default, under $HOME/.ipython/profile_default/
according to the documentation ipython.readthedocs.io/en/stable/development/config.html –
Bonin Open the file ~/.ipython/profile_default/ipython_config.py
, and
c.InteractiveShellApp.code_to_run = ''
==>
c.InteractiveShellApp.code_to_run = '%pylab inline'
© 2022 - 2024 — McMap. All rights reserved.
ipython profile create
. – Hooded