Spyder default module import list
Solution 1
The startup script for Spyder is in site-packages/spyderlib/scientific_startup.py
.
Carlos' answer would also work, but this is what I was looking for.
Solution 2
First you have to create a Python file with the modules you want to import at startup. Suppose you call it my_imports.py
and that it has this contents:
import numpy as np
import matplotlib.pyplot as plt
Then you have to go to
Tools > Preferences > IPython Console > Startup > Run a file
select the option
Use the following file
and finally click on the button to the right of text field below that option to select your my_imports.py
file.
Tom
Updated on June 20, 2022Comments
-
Tom almost 2 years
I'm trying to set up a slightly customised version of Spyder. When Spyder starts, it automatically imports a long list of modules, including things from matplotlib, numpy, scipy etc. Is there a way to add my own modules to that list?
In case it makes a difference, I'm using the Spyder configuration provided by the Python(X,Y) Windows installer.
-
Tom over 11 yearsThis amounts to "go read the source code" and is not an answer to the question!