DEV Community

Vidyasagar SC Machupalli
Vidyasagar SC Machupalli

Posted on

How to update Spyder in Anaconda to 5.x?

Spyder is one of my favorite IDE(Integrated Development Environment) for Python programming and visualization. I came across Spyder while using Anaconda Navigator

What is Spyder?

Spyder is a free and open-source scientific environment written in Python, for Python, and designed by and for scientists, engineers, and data analysts. It features a unique combination of the advanced editing, analysis, debugging, and profiling functionality of a comprehensive development tool with the data exploration, interactive execution, deep inspection, and beautiful visualization capabilities of a scientific package.

What didn't work 🤔

Whenever I launch Spyder IDE, I get this prompt to upgrade the version to 5.x, and today, I decided to do that on my macOS. So, I started with the commands I am aware of



conda update spyder


Enter fullscreen mode Exit fullscreen mode

Showed a couple of packages to update, hit y, no luck :(

then



conda update conda


Enter fullscreen mode Exit fullscreen mode

Failed with



RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.
RemoveError: 'setuptools' is a dependency of conda and cannot be removed from
conda's operating environment.


Enter fullscreen mode Exit fullscreen mode

So, tried with --force flag



conda update --force conda
conda update anaconda


Enter fullscreen mode Exit fullscreen mode

But, still no luck. I still see Spyder 4.x when I launch the IDE.

What worked 🎉

Here's for worked



conda update --all


Enter fullscreen mode Exit fullscreen mode


Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/vidyasagarmachupalli/opt/anaconda3


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    anaconda-navigator-2.0.1   |           py38_0         6.5 MB
    astropy-4.2.1              |   py38h9ed2024_1         6.1 MB
    conda-build-3.21.4         |   py38hecd8cb5_0         551 KB
    conda-repo-cli-1.0.3       |     pyhd3eb1b0_0         267 KB
    conda-token-0.2.0          |     pyhd3eb1b0_0           9 KB
    mkl-2021.2.0               |     hecd8cb5_269       100.0 MB
    mkl-service-2.3.0          |   py38h9ed2024_1          43 KB
    mkl_fft-1.3.0              |   py38h4a7008c_2         163 KB
    mkl_random-1.2.1           |   py38hb2f4e1b_2         272 KB
    numexpr-2.7.3              |   py38h5873af2_1         124 KB
    numpy-1.20.1               |   py38hd6e1bb9_0          22 KB
    numpy-base-1.20.1          |   py38h585ceec_0         4.4 MB
    pyerfa-1.7.3               |   py38h9ed2024_0         299 KB
    python-3.8.8               |       h88f2d9e_5        20.9 MB
    python.app-3               |   py38h9ed2024_0          20 KB
    scipy-1.6.2                |   py38hd5f7400_1        14.5 MB
    ------------------------------------------------------------
                                           Total:       154.1 MB

The following NEW packages will be INSTALLED:

  conda-repo-cli     pkgs/main/noarch::conda-repo-cli-1.0.3-pyhd3eb1b0_0
  conda-token        pkgs/main/noarch::conda-token-0.2.0-pyhd3eb1b0_0
  pyerfa             pkgs/main/osx-64::pyerfa-1.7.3-py38h9ed2024_0

The following packages will be UPDATED:

  anaconda-navigator                          1.10.0-py38_0 --> 2.0.1-py38_0
  astropy                              4.0.2-py38haf1e3a3_0 --> 4.2.1-py38h9ed2024_1
  conda-build                                 3.20.5-py38_1 --> 3.21.4-py38hecd8cb5_0
  mkl                                            2019.4-233 --> 2021.2.0-hecd8cb5_269
  mkl-service                          2.3.0-py38h9ed2024_0 --> 2.3.0-py38h9ed2024_1
  mkl_fft                              1.3.0-py38ha059aab_0 --> 1.3.0-py38h4a7008c_2
  mkl_random                           1.1.1-py38h959d312_0 --> 1.2.1-py38hb2f4e1b_2
  numexpr                              2.7.3-py38h16bde0e_0 --> 2.7.3-py38h5873af2_1
  numpy                               1.19.2-py38h456fd55_0 --> 1.20.1-py38hd6e1bb9_0
  numpy-base                          1.19.2-py38hcfb5961_0 --> 1.20.1-py38h585ceec_0
  python                                   3.8.5-h26836e1_1 --> 3.8.8-h88f2d9e_5
  python.app                                      2-py38_10 --> 3-py38h9ed2024_0
  scipy                                1.6.2-py38h2515648_0 --> 1.6.2-py38hd5f7400_1


Proceed ([y]/n)? y


Enter fullscreen mode Exit fullscreen mode

If you observe, the Anaconda Navigator is getting updated as well.

Restart the navigator to see this

Alt Text

For me, the Update application didn't work. So, I have to

  • Click Install specific version.
  • Select 5.0.0.

I hope this helps :)

Resolutions ⚠️

If you see the below error



/opt/anaconda3/bin/pythonw: line 3: /opt/anaconda3/python.app/Contents/MacOS/python: No such file or directory


Enter fullscreen mode Exit fullscreen mode

resolve it with



conda install --force python.app


Enter fullscreen mode Exit fullscreen mode

P.S. I also use Pycharm IDE for Python programming

Top comments (0)