These are chat archives for spyder-ide/public

22nd
Mar 2019
CAM Gerlach
@CAM-Gerlach
Mar 22 01:42

After an upgrade of Conda

@ScarVaapad What exact command did you run, and what did the output indicate it upgraded? More than likely, something with wrong either with conda or the command you entered that broke Spyder.

I'm using a quite customized build, so I guess there might be some mess in there

You're more than likely correct in any case, but what specifically do you mean by a "customized build"? Customized how, exactly? I need to know a lot more specifics in order to suggest the optimal way to clean it up. If you can't describe it precisely in prose, please post your conda list output of your Spyder environment.

CAM Gerlach
@CAM-Gerlach
Mar 22 01:50

@_Toaster_twitter Your issue appears entirely unrelated based on the limited information you provided, as it does not involve the same error message, or any error message at all, and you didn't mention it occurring after upgrading something.

Recently I can't start Spyder from my Anaconda.

Please provide specific details on whether it worked before, and if so, anything you can think of that changed (with your hardware, OS, other software, installing/updating/removing packages, and any configuration settings) between when it worked and when it didn't. Other than that, some things to try (test Spyder after each one; some are mutually exclusive):

  • Run spyder --reset from the Anaconda prompt, and try launching Spyder again
  • Temporarily disable any security, antivirus and firewall software you may have running, including Windows Defender. If that fixes it, make an exception/rule for Spyder.
  • Try upgrading Qt, with conda update pyqt qt sip from the Anaconda prompt
  • Try downgrading Qt, with conda install pyqt=5.6
  • Run set SPYDER_DEBUG=3 in an Anaconda prompt, then spyder, and report any messages that appear along with answering the above questions
Wenyuan Wang
@ScarVaapad
Mar 22 07:57

@CAM-Gerlach

packages in environment at /Users/ScarVaapad/anaconda:

#

Name Version Build Channel

anaconda custom py36ha4fed55_0

It was Wednesday when I open anaconda, it shows a message of asking me to update anaconda from 1.8. to 2.0. something like that I'm not sure for now. And that upgrade alone somehow damage the importing sequence for spyder in the mainwindow.py, the plugins folder doesn't seem to have related files.

CAM Gerlach
@CAM-Gerlach
Mar 22 13:52

Sorry, I should have asked you to paste your conda list output into another more appropriate venue like a Github Gist; as you can clearly see, it is only partially complete and nearly impossible to read due to not including code block formatting (``` above and below). If the below suggestions don't fix the issue, please do so.

open anaconda

update anaconda

I assuming you mean opening/updating Anaconda Navigator; it is just a little app that serves as a simplified GUI for on top of some parts of conda, and not an essential part of the Anaconda distribution as many seem to believe. Therefore, by itself it couldn't have affected Spyder, but potentially had one of the following side effects that did: A. Somehow leading to a corrupt Anaconda environment, B. Also installing something else, that it didn't show you, that resulted in a problem with Spyder, or C. You only tried launching Spyder from Navigator, and not our other recommended methods (from the Start menu on Windows, which is strictly faster/simpler and should always be preferred over Navigator; or from the Anaconda Prompt/terminal with spyder. You should try (and always use) the latter two methods, as Navigator has many bugs and often fails to launch applications like Spyder, and the shortcut, if available, is always strictly faster so there's never any reason to use Navigator.

If that doesn't fix it (if it does, it implies the bug is with Navigator), please answer my question above regarding What specifically do you mean by a "customized build"? and post your full conda list output to a Github Gist (or other such service), and I will see what I can do. Thanks.

Wenyuan Wang
@ScarVaapad
Mar 22 18:14
@CAM-Gerlach
Does this look better? or you can you go to the gist I created https://gist.github.com/ScarVaapad/0a5c791a5e3901d586fc5341adb610ac
I mentioned "custom" build of anaconda maybe because I downloaded a lot of packages using a mixed method of conda or pip, and the versions are not always agree with the list of a stable version of anaconda build.
Wenyuan Wang
@ScarVaapad
Mar 22 18:19
I tried update anaconda, but it didn't work, I don't know if it is because I have a custom build
CAM Gerlach
@CAM-Gerlach
Mar 22 20:29

downloaded a lot of packages using a mixed method of conda or pip

This is virtually guaranteed to break your install eventually if you do enough of it., and in particular you have Qt/PyQt (our GUI toolkit) installed via conda, but spyder itself via pip (and a old development version, Spyder 4 beta 1 besides, which we strongly recommend against it in our documentation, website, wiki, readme, contributing guide, troubleshooting guide, Github, update notifications, and install guide. Furthermore, it appears you have pip, wheel and setuptools installed from PyPI, which is really bad since that build will not necessarily integrate properly with conda and its environments.

the versions are not always agree with the list of a stable version of anaconda build.

The versions of our core deps pinned by the anaconda metapckage are generally those against which we and others test Spyder. Due to the complexity of our dependency stack, we do not recommend using versions other than those unless you really know what you are doing

Your most reliable option to clean up your mess is to just do a complete uninstall and reinstall of Anaconda, and never install pip (or conda-forge) packages into the base or Spyder environments, and instead only do so into a dedicated isolated Conda environment you've created for that purpose. Furthermore, never install packages from conda-forge unless they are unavailable from Anaconda defaults, and never install packages from pip unless they are unavailable from conda-forge; especially with core packages like pip and Spyder, you're just asking for trouble.
CAM Gerlach
@CAM-Gerlach
Mar 22 20:35
Also, @ScarVaapad , the formatting was correct but only a small portion of your conda list output was posted, and it took up a huge amount of space in the chat, which is why I removed it (and thanks for making it a Gist instead).