{"id":9327,"library":"spyder","title":"Spyder","description":"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]","status":"active","version":"6.1.4","language":"en","source_language":"en","source_url":"https://github.com/spyder-ide/spyder","tags":["IDE","scientific computing","data analysis","Python development","debugger","profiler","Qt","plugin"],"install":[{"cmd":"pip install spyder","lang":"bash","label":"Install with pip"},{"cmd":"conda install spyder","lang":"bash","label":"Install with Conda (recommended)"}],"dependencies":[{"reason":"Core language requirement.","package":"python","optional":false},{"reason":"Python bindings for Qt, used for Spyder's GUI.","package":"pyqt5","optional":false},{"reason":"Jupyter kernels for the Spyder console.","package":"spyder-kernels","optional":false},{"reason":"Interactive Python shell integration.","package":"ipython","optional":false},{"reason":"Fast autocompletion/static analysis for Python.","package":"jedi","optional":false},{"reason":"Numerical computing (built-in integration).","package":"numpy","optional":true},{"reason":"Scientific computing (built-in integration).","package":"scipy","optional":true},{"reason":"Data manipulation and analysis (built-in integration).","package":"pandas","optional":true},{"reason":"Plotting library (built-in integration).","package":"matplotlib","optional":true}],"imports":[{"note":"Used for developing Spyder plugins.","symbol":"SpyderPluginV2","correct":"from spyder.api.plugins import SpyderPluginV2"},{"note":"The `spyder.api.editor` module is pending deprecation and will be removed in Spyder 7.0. Use `spyder.plugins.editor.api` instead. [12]","wrong":"from spyder.api.editor import EditorExtension","symbol":"EditorExtension","correct":"from spyder.plugins.editor.api import EditorExtension"},{"note":"General users typically interact with Spyder as an application, not by importing its core components directly into arbitrary Python scripts. Programmatic imports are primarily for plugin development or extending the IDE. [1, 7]","symbol":"ClassName","correct":"import spyder"}],"quickstart":{"code":"# Save this file as 'hello_spyder.py' and run it in the Spyder IDE\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef generate_and_plot_data():\n    \"\"\"Generates some sample data and plots it.\"\"\"\n    x = np.linspace(0, 10, 100)\n    y = np.sin(x) + np.random.normal(0, 0.1, 100)\n\n    print(f\"Generated {len(x)} data points.\")\n    print(f\"Mean of y: {np.mean(y):.2f}\")\n\n    plt.figure()\n    plt.plot(x, y, label='Sine wave with noise')\n    plt.xlabel('X-axis')\n    plt.ylabel('Y-axis')\n    plt.title('Sample Data Plot')\n    plt.legend()\n    plt.grid(True)\n    plt.show()\n\nif __name__ == '__main__':\n    generate_and_plot_data()\n    # You can inspect 'x' and 'y' in Spyder's Variable Explorer after running this.","lang":"python","description":"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]"},"warnings":[{"fix":"Import `EditorExtension` and `Panel` from `spyder.plugins.editor.api` instead. [12]","message":"The `spyder.api.editor` module, containing legacy aliases for `EditorExtension` and `Panel`, is pending deprecation and will be removed in Spyder 7.0. [12]","severity":"deprecated","affected_versions":">=6.1.0"},{"fix":"Use the `on_initialize()` and `on_close()` methods for plugin initialization and cleanup respectively. [12]","message":"`SpyderPluginV2`'s `register()` and `unregister()` methods are no longer supported. [12]","severity":"breaking","affected_versions":">=5.1"},{"fix":"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]","message":"When developing local modules, if Spyder's working directory is not correctly set or updated, you might encounter `ModuleNotFoundError` when trying to import them, even if they are in the same directory as the script being executed. [6, 13, 16]","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"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]","cause":"Python cannot find the module because its directory is not in `sys.path` or Spyder's working directory is incorrectly configured. This often happens with locally created modules. [16, 25]","error":"ModuleNotFoundError: No module named 'my_module'"},{"fix":"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]","cause":"This error can occur if you're trying to use a class or function from a module that wasn't correctly imported, or if there's a case sensitivity mismatch. Python is case-sensitive. [16]","error":"NameError: name 'Car' is not defined"},{"fix":"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]","cause":"This can be due to corrupted configuration files, incompatible dependencies, or issues with the underlying Qt/GUI framework. [12]","error":"Spyder fails to start or crashes on launch"}]}