Repository: spyder-ide/spyder

Issue:
Add a message in the update dialog about not using pip if Spyder is running under Anaconda/Miniconda
@andfoy, the message should detect if Spyder is running under Anaconda or Miniconda and then it should warn users in our Update dialog like this:

> **Important note**: If you are using Spyder with Anaconda or Miniconda, please **don't** use `pip` to update it because that will (most probably) break your installation.<br>
Instead, please wait until new conda packages are made available and use `conda update spyder` to do it.


Discussion:

Resolving patch:
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -2759,9 +2759,9 @@ def _check_updates_ready(self):
         box.set_checkbox_text(_("Check for updates on startup"))
         box.setStandardButtons(QMessageBox.Ok)
         box.setDefaultButton(QMessageBox.Ok)
-        #The next line is commented because it freezes the dialog.
-        #For now there is then no info icon. This solves issue #3609.
-        #box.setIcon(QMessageBox.Information)
+        # The next line is commented because it freezes the dialog.
+        # For now there is then no info icon. This solves issue #3609.
+        # box.setIcon(QMessageBox.Information)
 
         # Adjust the checkbox depending on the stored configuration
         section, option = 'main', 'check_updates_on_startup'
@@ -2776,6 +2776,18 @@ 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 "
@@ -2783,6 +2795,7 @@ def _check_updates_ready(self):
                         "proceed to update Spyder please refer to our "
                         " <a href=\"%s\">Installation</a> instructions."
                         "") % (latest_release, url_r, url_i)
+                msg += '<br>' + anaconda_msg
                 box.setText(msg)
                 box.set_check_visible(True)
                 box.exec_()
@@ -2799,7 +2812,7 @@ def _check_updates_ready(self):
 
         # Enable check_updates_action after the thread has finished
         self.check_updates_action.setDisabled(False)
-        
+
         # Provide feeback when clicking menu if check on startup is on
         self.give_updates_feedback = True
 


Test patch: