Spyder is the Scientific Python Development Environment, a powerful open-source Integrated Development Environment (IDE) written in Python, for Python. It is designed for scientists, engineers, and data analysts, offering a unique blend of advanced editing, analysis, debugging, and profiling functionalities with capabilities for data exploration, interactive execution, deep inspection, and visualization. Spyder is actively developed with continuous releases, with the current version being 6.1.4. [3, 15, 16, 23]
pip install spyderVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a typical workflow within the Spyder IDE. Users write Python code in the Editor pane, which can then be executed. The output (e.g., print statements) appears in the IPython Console, and variables (like `x` and `y`) can be interactively inspected and modified in the Variable Explorer. Plots generated (e.g., with Matplotlib) will appear in the Plots pane. To run this, simply save it as a .py file in Spyder's editor and press F5. [5, 9, 10, 15]
Import `EditorExtension` and `Panel` from `spyder.plugins.editor.api` instead. [12]
Use the `on_initialize()` and `on_close()` methods for plugin initialization and cleanup respectively. [12]
Ensure Spyder's working directory is set to the project directory (Tools > Preferences > Run > Working Directory settings). If new modules are added during a session, sometimes restarting Spyder or the IPython kernel is necessary for them to be recognized. [6, 13, 18]
Go to 'Tools' -> 'PYTHONPATH manager' in Spyder and add the directory containing 'my_module.py'. Alternatively, ensure 'Preferences' -> 'Run' -> 'Working Directory settings' is set to 'The directory of the file being executed' or 'The current working directory' and you are in the correct directory. Restarting the IPython console may also resolve the issue. [6, 13]
Verify the exact casing of the class/function name in your `import` statement and when you call it. For example, if the class is `Car` in `car.py`, you should use `from car import Car` or `import car; my_car_instance = car.Car()`. [16]
Try resetting Spyder's configuration by running `spyder --reset` in your terminal. If using Anaconda, ensure your `conda` environment is up to date with `conda update --all`. Consider creating a new `conda` environment and reinstalling Spyder. [3]