Skip to content

Commit 58d3acb

Browse files
authored
Update troubleshooting guide for Spyder 6 (#419)
2 parents 91074fb + 9e75f5d commit 58d3acb

7 files changed

Lines changed: 83 additions & 109 deletions

File tree

doc/conf.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,16 @@
302302

303303
linkcheck_ignore = [
304304
# Virtual fragment ids
305-
r"https://(www\.)?github\.com/.+/compare/.+#diff-.+",
305+
r"https://(www\.)?github\.com/.+/.+/compare/.+#diff-.+",
306+
r"https://(www\.)?github\.com/.+/.+/blob/.+/.+\.(md|rst)#.+",
306307
# Flaky
307-
r"https://(www\.)?packages\.gentoo\.org/?.*",
308-
r"https://(www\.)?software\.opensuse\.org/?.*",
309-
r"https://(www\.)?packages\.ubuntu\.com/?.*",
310-
r"https://(www\.)?github\.com/.+/commit/.+",
311308
r"https://(www\.)?figshare\.com/?.*",
309+
r"https://(www\.)?github\.com/.+/commit/.+",
312310
r"https://(www\.)?opencollective\.(org|com)/?.*",
311+
r"https://(www\.)?packages\.gentoo\.org/?.*",
312+
r"https://(www\.)?packages\.ubuntu\.com/?.*",
313+
r"https://(www\.)?ports\.macports\.org/port/.+/?",
314+
r"https://(www\.)?software\.opensuse\.org/?.*",
313315
# Blocks GitHub Actions
314316
r"https://(www\.)?guru99\.com/?.*",
315317
r"https://(www\.)?(\w+\.)?reddit\.com/?.*",

doc/troubleshooting/basic-first-aid.rst

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,29 @@ Recommended troubleshooting steps
1717
#. **Restart Spyder**, and try what you were doing before again.
1818

1919
#. **Upgrade Spyder** to the latest release, and you might find your issue is resolved (along with new features, enhancements, and other bug fixes).
20-
Minor releases come out every couple months, so unless you've updated recently, there is a good chance your version isn't the latest.
20+
Bugfix releases come out every month or two, so unless you've updated recently, there is a good chance your version isn't the latest.
2121
You can find out with the :guilabel:`Check for updates` command under the :guilabel:`Help` menu.
2222

2323
.. image:: /images/basic-first-aid/basic-first-aid-updates.png
2424
:alt: Spyder showing view internal console option
2525

26-
To perform the update with Conda (strongly recommended), from your terminal (or Anaconda Prompt on Windows) run:
26+
Recent versions of Spyder using our recommended :ref:`install-standalone` will offer to automatically update themselves for you.
27+
If using an older version of Spyder or a non-standalone build (e.g. installed with Pip or Conda), we recommend downloading and running our latest :ref:`install-standalone`.
2728

28-
.. code-block:: bash
29-
30-
conda update anaconda
31-
conda update spyder
29+
To perform the update with Conda, see the FAQ :ref:`update-conda`; to update with Pip use ``pip install --ugprade spyder``.
30+
If that still doesn't work, we recommend updating Spyder's dependencies and environment, either by installing the latest version of Anaconda/Miniconda/Miniforge, or with the relevant "update all" command in your terminal (or Anaconda Prompt on Windows).
3231

33-
#. **Update Spyder's dependencies and environment**, either by installing the latest version of your distribution (e.g. the recommended Anaconda), or with the relevant "update all" command in your terminal (or Anaconda Prompt on Windows).
3432
To get the latest stable version of everything using Conda, you can run:
3533

36-
.. code-block:: bash
34+
.. code-block:: shell
35+
36+
conda update spyder qt pyqt spyder-kernels ipython ipykernel jupyter_client jupyter_core pyzmq
3737
38-
conda update qt pyqt spyder-kernels ipython ipykernel jupyter_client jupyter_core pyzmq
38+
Or with Pip:
39+
40+
.. code-block:: shell
41+
42+
pip install --upgrade --upgrade-strategy "eager" spyder spyder-kernels ipython ipykernel jupyter_client jupyter_core pyzmq traitlets
3943
4044
#. **Restart your machine**, in case the problem lies with a lingering process or another such issue.
4145

@@ -51,13 +55,13 @@ Recommended troubleshooting steps
5155
This will reset your preferences, as well as any custom keyboard shortcuts or syntax highlighting schemes.
5256
If you particularly care about any of those, you should make a copy of the :file:`.spyder-py3` folder in your user home directory (:file:`C:/Users/YOUR_USERNAME` on Windows, :file:`/Users/YOUR_USERNAME` on macOS, or :file:`/home/YOUR_USERNAME` on Linux), and restore it afterwards if this doesn't solve the problem.
5357

54-
#. **Try installing Spyder into a new Conda environment** (recommended) or ``virtualenv``/``venv``, and see if the issue reoccurs.
58+
#. **Try reinstalling Spyder** via our :ref:`install-standalone` (recommended), or in a fresh Conda/virtual environment, and see if the issue reoccurs.
5559

56-
In your system terminal (or Anaconda Prompt on Windows), run the following commands to create an a fresh, clean environment and start Spyder in it:
60+
If using Conda to install Spyder (only recommended for advanced users needing plugin support), in your system terminal (or Anaconda Prompt on Windows), run the following commands to create a clean environment and start Spyder in it:
5761

58-
.. code-block:: bash
62+
.. code-block:: shell
5963
60-
conda create -n spyder-env spyder -y
64+
conda create -y -n spyder-env spyder numpy scipy pandas matplotlib cython sympy
6165
conda activate spyder-env
6266
spyder
6367
@@ -81,20 +85,27 @@ Reinstalling Spyder
8185

8286
If none of the previous steps solve your issue, you should do a full uninstall of Spyder by whatever means you originally installed it.
8387

84-
For Anaconda, follow all the steps under Option B in the `Anaconda uninstall guide`_, delete the Anaconda directory wherever it was originally installed, and (on Windows) remove the :file:`%appdata%/python` directory if it exists.
88+
For Spyder's standalone installers, the uninstall mechanism varies depending on your operating system.
89+
On Windows, it can be removed via the entry under :guilabel:`Add or remove programs`.
90+
91+
For Anaconda/Miniconda, follow all the steps under `Anaconda uninstall guide`_/`Miniconda uninstall guide`_.
92+
For Miniforge, follow the `Miniforge uninstall instructions`_ on macOS/Linux or remove it from :guilabel:`Add or remove programs` on Windows.
93+
Then, delete the Anaconda/Miniconda/Miniforge directory wherever it was originally installed, and (on Windows) remove the :file:`%appdata%/python` directory if it exists.
8594

8695
.. image:: /images/basic-first-aid/basic-first-aid-app-data.gif
87-
:alt: Deleting appdata/python directory
96+
:alt: Deleting AppData/python directory
8897

89-
Then, do a clean install of the latest version of the `Anaconda distribution`_ which is how we recommend you install Spyder and keep it up to date.
98+
Finally, do a clean install of the latest version of our :ref:`install-standalone`, which is how we recommend you install Spyder and keep it up to date.
9099

91100
.. important::
92101

93-
While you are welcome to get Spyder working on your own by one of the many other means we offer, we are only able to provide individual support for install-related issues for users of the Anaconda distribution.
94-
In particular, pip installation, while doable, is only really for experts, as there are many pitfalls involved and different issues specific to your setup, which is why we recommend using Conda whenever possible.
102+
While you are welcome to get Spyder working on your own by one of the many other means we offer, we are only normally able to provide individual support for user-specific install issues related to our :ref:`install-standalone`.
103+
In particular, managing your own installation via Conda or Pip can be easy to break, as there are many pitfalls involved and different issues specific to your setup, which is why we recommend using our standalone installers whenever possible.
95104
For further information, please visit our :ref:`install-guide`.
96105

97-
.. _Anaconda uninstall guide: https://docs.anaconda.com/anaconda/install/uninstall/
106+
.. _Anaconda uninstall guide: https://www.anaconda.com/docs/getting-started/anaconda/uninstall
107+
.. _Miniconda uninstall guide: https://www.anaconda.com/docs/getting-started/miniconda/uninstall
108+
.. _Miniforge uninstall instructions: https://github.com/conda-forge/miniforge/blob/main/README.md#uninstall
98109
.. _Anaconda distribution: https://www.anaconda.com/products/distribution
99110

100111

@@ -112,21 +123,21 @@ If you manage to isolate the bug, report it to the last one it *doesn't* work in
112123
#. **Spyder** itself, of course!
113124
Make sure you can reproduce the error after closing and reopening it, if possible.
114125

115-
#. **A bare QtConsole instance**, e.g. launched from Anaconda navigator or from the Anaconda Prompt/Terminal/command line (Windows/Mac/Linux) with ``jupyter qtconsole``.
126+
#. **A bare QtConsole instance**, e.g. launched from the system terminal (Anaconda Prompt, on Windows) with ``jupyter qtconsole``.
116127

117128
.. image:: /images/basic-first-aid/basic-first-aid-qtconsole.png
118129
:alt: Anaconda navigator showing qtconsole
119130

120-
QtConsole is the GUI console backend Spyder depends on to run its code, so most issues involving Spyder's :ref:`panes-console` are actually something with QtConsole instead, and can be reported to their `issue tracker`_.
131+
QtConsole is the GUI console backend Spyder depends on to run its code, so most issues involving Spyder's :ref:`panes-console` usually have something to do with QtConsole instead, and can be reported to the `QtConsole issue tracker`_.
121132

122-
#. **An IPython command line shell**, launched with e.g. ``ipython`` from the Anaconda Prompt/Terminal/command line (Windows/Mac/Linux).
123-
Reproducible bugs can be reported to their `Github page`_, though make sure to read their guidelines and docs first.
133+
#. **An IPython command line shell**, launched with e.g. ``ipython`` from system terminal (Anaconda Prompt, on Windows).
134+
Reproducible bugs can be reported to the `IPython issue tracker`_, though make sure to read their guidelines and docs first.
124135

125-
#. **A standard Python interpreter**, either run as a script file with ``python path/to/your/file.py`` or launched interactively with ``python`` from your Anaconda Prompt/Terminal/command line (Windows/Mac/Linux).
126-
While it is not impossible that you've found Python bug, it is much more likely to be an issue with the code itself or a package you are using, so your best sources are the `Python docs`_ and the other resources listed above.
136+
#. **A standard Python interpreter**, either run as a script file with ``python path/to/your/file.py`` or launched interactively with ``python`` from your system terminal (Anaconda Prompt, on Windows).
137+
While it is not impossible that you've found a Python bug, it is much more likely to be an issue with the code itself or a package you are using, so your best sources are the `Python docs`_ and the other resources listed above.
127138

128-
.. _issue tracker: https://github.com/jupyter/qtconsole/issues/
129-
.. _Github page: https://github.com/ipython/ipython/issues
139+
.. _QtConsole issue tracker: https://github.com/jupyter/qtconsole/issues/
140+
.. _IPython issue tracker: https://github.com/ipython/ipython/issues
130141
.. _Python docs: https://www.python.org/doc/
131142

132143
.. tip::

doc/troubleshooting/call-for-help.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ Our `Google Group`_ is great for help-related questions, particularly those you
5858
Spyder website
5959
~~~~~~~~~~~~~~
6060

61-
The `Spyder site`_ contains basic information about the IDE and links to many other helpful resources.
61+
The `Spyder website`_ contains basic information about the IDE and links to other helpful resources.
6262

63-
.. _Spyder site: https://www.spyder-ide.org/
63+
.. _Spyder website: https://www.spyder-ide.org/
6464

6565

6666
.. rst-class:: fabb fa-stack-overflow
@@ -141,7 +141,7 @@ Anaconda help
141141

142142
The `Anaconda docs`_ site offers free community help and documentation for the Anaconda applications, installing the Anaconda distribution, and using the Conda package and environment manager; along with paid support options.
143143

144-
.. _Anaconda docs: https://anaconda.cloud/support-center
144+
.. _Anaconda docs: https://www.anaconda.com/docs/
145145

146146

147147
.. rst-class:: fasb fa-flask
@@ -176,6 +176,6 @@ Project Jupyter
176176
Data Science Stack Exchange
177177
~~~~~~~~~~~~~~~~~~~~~~~~~~~
178178

179-
The `Data Science`_ site in Stack Exchange can be very useful for questions that relate more to data science than programming specifically.
179+
The `Data Science Stack Exchange site`_ can be very useful for questions that relate more to data science than programming specifically.
180180

181-
.. _Data Science: https://datascience.stackexchange.com/
181+
.. _Data Science Stack Exchange site: https://datascience.stackexchange.com/

doc/troubleshooting/common-illnesses.rst

Lines changed: 15 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,11 @@ Spyder requires a supported version of the ``spyder-kernels`` package to be pres
3030
.. image:: /images/common-illnesses/common-illnesses-kernel-version.png
3131
:alt: Kernel version error dialog
3232

33-
It is included by default with Anaconda, but if you want to run your code in another Python environment or installation, you'll need to make sure it's installed and updated to the latest version.
34-
35-
Check the required version of spyder-kernels for your version of Spyder in the following table:
36-
37-
.. table:: Spyder and Spyder-Kernels version compatibility
38-
39-
============== ==============
40-
Spyder Spyder-Kernels
41-
============== ==============
42-
4.0.0-4.0.1 1.8.1
43-
4.1.0-4.1.2 1.9.0
44-
4.1.3 1.9.1
45-
4.1.4 1.9.3
46-
4.1.5-4.1.6 1.9.4
47-
4.2.0 1.10.0
48-
5.0.0-5.0.5 2.0.5
49-
5.1.0-5.1.5 2.1.3
50-
5.2.0-5.2.1 2.2.0
51-
5.2.2 2.2.1
52-
5.3.0-5.3.3 2.3.3
53-
5.4.0-5.4.3 2.4.3
54-
============== ==============
55-
56-
To do so, activate the environment, then install ``spyder-kernels``.
57-
If using Anaconda, open a terminal (Anaconda Prompt on Windows) and run:
33+
It is included by default in Spyder's own runtime environment, but if you want to run your code in your own Python environment or installation, you'll need to make sure it's installed and updated to the latest version.
5834

59-
.. code-block:: bash
60-
61-
conda activate ENVIRONEMENT-NAME
62-
conda install spyder-kernels=<VERSION>
63-
64-
Otherwise, activate your environment by whatever means you created it, and execute:
65-
66-
.. code-block:: bash
35+
To do so, open a system terminal, activate the Conda or virtual environment you want to use Spyder with, and then copy and paste the command Spyder generates for you (the ``conda`` command if in a Conda environment, or ``pip`` otherwise).
6736

68-
pip install spyder-kernels==<VERSION>
69-
70-
For both of the previous commands, replace ``<VERSION>`` with the corresponding version in the table.
37+
Spyder 6.2+ will offer to update your Spyder-Kernels version automatically, if using Spyder through our recommended :ref:`install-standalone`.
7138

7239

7340
.. _troubleshooting-common-kernel-dependency:
@@ -78,26 +45,26 @@ Issue with another dependency
7845
If the kernel displays a long error traceback that mentions other packages like ``ipython``, ``ipykernel``, ``jupyter_client``, ``traitlets`` or ``pyzmq``, the problem may be an out of date or incompatible version of a dependency package.
7946
To fix this, activate the environment and update the key dependencies.
8047

81-
In an Anaconda environment:
48+
In a Conda environment:
8249

8350
.. code-block:: bash
8451
85-
conda activate ENVIRONMENT-NAME
52+
conda activate ENVIRONMENT-NAME # Replace with the name of your desired environment
8653
conda update spyder-kernels ipython ipykernel jupyter_client jupyter_core pyzmq traitlets
8754
8855
Otherwise, activate your environment by whatever means you created it, and run:
8956

9057
.. code-block:: bash
9158
92-
pip install -U spyder-kernels ipython ipykernel jupyter_client jupyter_core pyzmq traitlets
59+
pip install --upgrade --upgrade-strategy "eager" spyder-kernels ipython ipykernel jupyter_client jupyter_core pyzmq traitlets
9360
9461
9562
.. _troubleshooting-common-kernel-error:
9663

9764
AttributeError/ImportError
9865
~~~~~~~~~~~~~~~~~~~~~~~~~~
9966

100-
Check the last few lines of the error message, and see if its an ``AttributeError`` or ``ImportError``, or refers to a file you created in your current working directory or your home folder (:file:`C:/Users/YOUR_USERNAME` on Windows, :file:`/Users/YOUR_USERNAME` on macOS, or :file:`/home/YOUR_USERNAME` on Linux).
67+
Check the last few lines of the error message, and see if it's an ``AttributeError`` or ``ImportError``, or refers to a file you created in your current working directory or your home folder (:file:`C:/Users/YOUR_USERNAME` on Windows, :file:`/Users/YOUR_USERNAME` on macOS, or :file:`/home/YOUR_USERNAME` on Linux).
10168

10269
.. image:: /images/common-illnesses/common-illnesses-atribute-error.png
10370
:alt: Spyder's AtributeError dialog
@@ -117,8 +84,8 @@ To check the names of these modules, see the list in the `Python standard librar
11784
Completion/help not working
11885
===========================
11986

120-
To provide code completions, help and real-time analysis in the Editor, Spyder uses the Python Language Server (PyLS), an implementation of the Language Server Protocol specification used by VSCode, Atom and other popular editors/IDEs.
121-
Most help and completion issues lie outside of Spyder's control, and are either limitations with PyLS or the code that is being introspected, but some can be worked around.
87+
To provide code completions, help and real-time analysis in the Editor, Spyder uses the Python LSP Server (PyLSP), an implementation of the same Language Server Protocol specification supported by VSCode, Neovim and other popular editors/IDEs.
88+
Most help and completion issues lie outside of Spyder's control, and are either limitations with PyLSP or the code that is being introspected, but some can be worked around.
12289

12390

12491
.. _troubleshooting-common-completion-docstring:
@@ -155,7 +122,7 @@ LSP has stopped working
155122
~~~~~~~~~~~~~~~~~~~~~~~
156123

157124
Occasionally, especially after using Spyder for a while, code completion, help and analysis may stop working.
158-
If this is the case, you can check LSP status with the :guilabel:`LSP Python` item in Spyder's status bar at the bottom of the screen, and restart it by right-clicking it and selecting the :guilabel:`Restart Python Language Server` item.
125+
If this is the case, you can check LSP status with the :guilabel:`LSP: Python` item in Spyder's status bar at the bottom of the screen, and restart it by right-clicking it and selecting the :guilabel:`Restart Python Language Server` item.
159126

160127
.. image:: /images/common-illnesses/common-illnesses-LSP-restart.png
161128
:alt: Spyder with LSP restart dialog
@@ -168,12 +135,7 @@ Spyder bug/dependency issue
168135

169136
Given the variety of dependencies involved in making LSP work, an incompatible or out of date version in your environment can result in error messages, incomplete results, or help/analysis not working at all.
170137

171-
To address this, first try updating Anaconda and Spyder as described in :ref:`troubleshooting-basic`.
172-
If the issue still isn't resolved, update the various relevant dependencies with:
173-
174-
.. code-block:: bash
175-
176-
conda update python-language-server
138+
To address this, try updating Spyder as described in :ref:`troubleshooting-basic`.
177139

178140

179141

@@ -188,15 +150,15 @@ Plugin Problems
188150
Plugin does not work at all
189151
~~~~~~~~~~~~~~~~~~~~~~~~~~~
190152

191-
If you have installed a Spyder plugin, but you can't see it, go to the :guilabel:`Panes` submenu of the :guilabel:`View` menu and select the plugin's name, which should make its pane visible.
192-
If you don't see the plugin there, select the :guilabel:`Dependencies` item under the :guilabel:`Help` menu and see if the plugin appears at the bottom.
153+
If you have installed a Spyder plugin, but you can't see it, go to the :guilabel:`Panes` submenu of the :guilabel:`Window` menu and select the plugin's name, which should make it visible if it contains a standalone pane.
154+
If you don't see the plugin there, select the :guilabel:`Plugins` section under Spyder's :guilabel:`Preferences` and see if it is listed there.
193155

194156
.. image:: /images/common-illnesses/common-illnesses-plugins.png
195157
:alt: Dependencies dialog showing Unittest plugin
196158

197-
If the plugin with the problem is not listed in the dependencies dialog, check that you installed it in the same environment as Spyder.
159+
If the plugin with the problem is not listed in the :guilabel:`Plugins` Preferences section, check that you installed it in the same environment as Spyder.
198160
If you have, then the problem may well be caused by a dependency issue.
199-
Test whether you can import the plug-in manually by opening a Python console in the same environment as Spyder and typing, for instance, ``import spyder_unittest`` to test the Spyder-Unittest` plug-in; this command should run without errors.
161+
Test whether you can import the plug-in manually by opening a Python console in the same environment as Spyder and typing, for instance, ``import spyder_unittest`` to test the Spyder-Unittest plug-in; this command should run without errors.
200162

201163
If none of this helps you to resolve the problem, then continue to the next section.
202164

0 commit comments

Comments
 (0)