conda and conda-forge Channels
Spyder 5.1.5 is included in the (base) conda environment of Anaconda. The (base) conda environment installs the latest packages available on the conda channel which is maintained by Anaconda Incorporated. This channel is usually 6 months to a year behind the conda-forge channel which is the community channel maintained directly by developers. Often the latest version of Spyder includes a number of fixes and improvements and should be used in preference to the older version.
The conda (base) environment includes a very large number of packages. Because the Spyder IDE itself has a large number of dependencies, trying to update Spyder in the (base) conda environment using the latest version from the conda-forge channel usually results in the conda package manager being unable to solve the conda environment.
Create a conda Environment
We should instead create a separate conda environment called "spyder-cf" using the Anaconda Powershell Prompt (Windows) or Terminal (Linux):
conda create -n spyder-cf
Activate a conda Environment
Once we have created the conda environment, we must activate it. Activation means the conda environment is selected and any conda command will reference packages in this conda environment. Notice that the prompt will change from (base) to (spyder-cf) indicating that this conda environment is selected:
conda activate spyder-cf
Installing Spyder 5 and Mandatory Dependencies
The following command will install the latest version of spyder from the conda-forge channel and all its mandatory dependencies such as a compatible version of Python:
conda install -c conda-forge spyder
Installing Spyder 5 Optional Dependencies
The most commonly used data science libraries used with Spyder 5 are numpy, pandas, matplotlib, seaborn and scikit-learn. The latest compatible versions should be installed from conda-forge:
conda install -c conda-forge cython seaborn sympy openpyxl xlrd xlsxwriter lxml sqlalchemy scikit-learn
Installing seaborn will install a compatible version of numpy, pandas and matplotlib. Most of the other packages being installed are for reading and writing CSV, Excel or SQL Files and are commonly invoked by pandas when reading files to dataframes or writing dataframes to files.
To launch Spyder, make sure the "spyder-cf" conda environment is activated and then launch Spyder from it using:
Updating Packages from conda-forge
To update all packages, make sure the "spyder-cf" conda environment is activated and then update all the packages using:
conda update -c conda-forge --all