-
Open a terminal and go to the following directory
cd ~/.ipython/profile_default/startup
-
Now create a python file. You can name it anything you want:
touch start.py
-
Now open the file you can do inside the terminal or open up your favorite IDE.
nano start.py
Place all the libraries that you want to get imported by default.
No press
CMD+X
and pressY
to save.If you have jupyter instance running you need to restart them.
To check if you successfully included those libraries you can check them in
globals()
in a notebook:
Ref: How to Automatically Import Your Favorite Libraries into IPython or a Jupyter Notebook
Top comments (0)