Repository: spyder-ide/spyder

Issue:
Add instructions about using "conda update anaconda" to the update dialog
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

### Issue Report Checklist

* [ ] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [ ] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [ ] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [ ] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [ ] Tried basic troubleshooting (if a bug/error)
    * [ ] Restarted Spyder
    * [ ] Reset preferences with ``spyder --reset``
    * [ ] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [ ] Tried the other applicable steps from the Troubleshooting Guide
* [ ] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below


## Problem Description



### What steps reproduce the problem?

1. 
2. 
3. 

### What is the expected output? What do you see instead?



### Paste Traceback/Error Below (if applicable)
<!--- Copy from error dialog or View > Panes > Internal Console --->

```python-traceback

PASTE TRACEBACK HERE

```

## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: 
* Python version: 
* Qt version: 
* PyQt version: 
* Operating System name/version: 

### Dependencies
<!--- Please go to the menu entry Help > Dependencies,
press the Copy to clipboard button and paste below --->

```
PASTE DEPENDENCIES HERE
```



Discussion:
Started a introductory course on Python at MITOpenCourseware. This required installation of Anaconda. Like in the course I wanted to use Spyder, and after installating Anaconda (i.e. "fresh") this immediately repeatingly wanted an update (which is also 'strongly recommanded'). However, this update didn't work, taking a lot of time and finally reporting conflicts. I found the/a solution that worked at: https://github.com/spyder-ide/spyder/issues/10964 (suggesting several solutions, but for me the "conda update anaconda" worked)), but this is a closed issue. However, it stil persists almost half a year and four versions later. This is very discouraging for beginning students, not being skilled as system manager. 
I'm sorry, closed by accident. 
hi i have the same issue not being able to install spyder 4.1.2, when u said downgrading does it downgrade to the older versions? and then ur able to install spyder 4.1.2?

@adeny100 I noticed it being mentioned when I did the "conda update anaconda" command in the Anaconda Prompt, so it happend automatically. It did downgrade something, but I don't know what. My impression, for what it's worth, was not the Spyder, not the Anaconda and not the Python. 


This is a known issue with Anaconda, i.e. that you need to run first

    conda update anaconda

before running

    conda install spyder=4.1.2

after a fresh Anaconda installation.

I updated the instructions in our [Releases page](https://github.com/spyder-ide/spyder/releases) with that info. However, we'll also add this advice to our update dialog so that people can have access to that info from within Spyder too.
@ModeratelyModular, on a side note: could you let us know the name of the Python course you're taking that uses Spyder?
@ccordoba12  I used the link from here:

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/assignments/

In the video course they use Spider (that apparently comes with Anaconda, but it is stated the other way around too ;-))
Thanks for the info @ModeratelyModular!

@juanis2112, could you ~~blog~~ tweet about this? The last available "Introduction to Computer Science and Programming in Python" course in MIT's OpenCourseWare is using Spyder, as can be seen in the screenshot below:

![imagen](https://user-images.githubusercontent.com/365293/81483060-f669b700-9200-11ea-9d4c-a8e98bd48e16.png)

That's good old Spyder 2, but I still think it's important!
This is the link to the page I'm showing above:

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/lecture-videos/lecture-2-branching-and-iteration/

The video is paused on minute `4:33`.
I'm so glad that my spyder 4.1.2 could be installed because of this. Thank you so much @ModeratelyModular and @ccordoba12 !!!
@adeny100 You're welcome. Glad to have been of any help.
@ccordoba12  Thanks for the quick and adequate response. 


Resolving patch:
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -3360,7 +3360,7 @@ def _check_updates_ready(self):
         """Called by WorkerUpdates when ready"""
         from spyder.widgets.helperwidgets import MessageCheckBox
 
-        # feedback` = False is used on startup, so only positive feedback is
+        # `feedback` = False is used on startup, so only positive feedback is
         # given. `feedback` = True is used when after startup (when using the
         # menu action, and gives feeback if updates are, or are not found.
         feedback = self.give_updates_feedback
@@ -3370,14 +3370,15 @@ def _check_updates_ready(self):
         latest_release = self.worker_updates.latest_release
         error_msg = self.worker_updates.error
 
-        url_r = __project_url__ + '/releases'
+        # Release url
+        url_r = __project_url__ + '/releases/tag/v{}'.format(latest_release)
         url_i = 'https://docs.spyder-ide.org/installation.html'
 
         # Define the custom QMessageBox
         box = MessageCheckBox(icon=QMessageBox.Information,
                               parent=self)
-        box.setWindowTitle(_("Spyder updates"))
-        box.set_checkbox_text(_("Check for updates on startup"))
+        box.setWindowTitle(_("New Spyder version"))
+        box.set_checkbox_text(_("Check for updates at startup"))
         box.setStandardButtons(QMessageBox.Ok)
         box.setDefaultButton(QMessageBox.Ok)
 
@@ -3394,26 +3395,29 @@ def _check_updates_ready(self):
             check_updates = box.is_checked()
         else:
             if update_available:
-                anaconda_msg = ''
-                if 'Anaconda' in sys.version or 'conda-forge' in sys.version:
-                    anaconda_msg = _("<hr><b>IMPORTANT NOTE:</b> It seems "
-                                     "that you are using Spyder with "
-                                     "<b>Anaconda/Miniconda</b>. Please "
-                                     "<b>don't</b> use <code>pip</code> to "
-                                     "update it as that will probably break "
-                                     "your installation.<br><br>"
-                                     "Instead, please wait until new conda "
-                                     "packages are available and use "
-                                     "<code>conda</code> to perform the "
-                                     "update.<hr>")
-                msg = _("<b>Spyder %s is available!</b> <br><br>Please use "
-                        "your package manager to update Spyder or go to our "
-                        "<a href=\"%s\">Releases</a> page to download this "
-                        "new version. <br><br>If you are not sure how to "
-                        "proceed to update Spyder please refer to our "
-                        " <a href=\"%s\">Installation</a> instructions."
-                        "") % (latest_release, url_r, url_i)
-                msg += '<br>' + anaconda_msg
+                header = _("<b>Spyder {} is available!</b><br><br>").format(
+                    latest_release)
+                footer = _(
+                    "For more information visit our "
+                    "<a href=\"{}\">installation guide</a>."
+                ).format(url_i)
+                if is_anaconda():
+                    content = _(
+                        "<b>Important note:</b> Since you installed "
+                        "Spyder with Anaconda, please <b>don't</b> use "
+                        "<code>pip</code> to update it as that will break "
+                        "your installation.<br><br>"
+                        "Instead, run the following commands in a "
+                        "terminal:<br>"
+                        "<code>conda update anaconda</code><br>"
+                        "<code>conda install spyder={}</code><br><br>"
+                    ).format(latest_release)
+                else:
+                    content = _(
+                        "Please go to <a href=\"{}\">this page</a> to "
+                        "download it.<br><br>"
+                    ).format(url_r)
+                msg = header + content + footer
                 box.setText(msg)
                 box.set_check_visible(True)
                 box.exec_()


Test patch: