Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder not opening after conda update #12557

Closed
10 tasks
srvmig opened this issue Apr 30, 2020 · 10 comments
Closed
10 tasks

Spyder not opening after conda update #12557

srvmig opened this issue Apr 30, 2020 · 10 comments

Comments

@srvmig
Copy link

srvmig commented Apr 30, 2020

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide 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
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

After updating through condo update --all my spyder is not opening/starting at all.

What steps reproduce the problem?

What is the expected output? What do you see instead?

Paste Traceback/Error Below (if applicable)

Traceback (most recent call last):
File "C:\Users\ASUS\Anaconda3\Scripts\spyder-script.py", line 10, in 
sys.exit(main())
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\app\start.py", line 205, in main
mainwindow.main()
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3734, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3590, in run_spyder
main.setup()
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 977, in setup
'spyder.plugins.{}'.format(plugin_name))
File "C:\Users\ASUS\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\plugins\pylint\__init__.py", line 14, in 
from .plugin import Pylint as PLUGIN_CLASS
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\plugins\pylint\plugin.py", line 29, in 
from spyder.plugins.pylint.confpage import PylintConfigPage
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\plugins\pylint\confpage.py", line 16, in 
from spyder.plugins.pylint.widgets.pylintgui import PylintWidget
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\plugins\pylint\widgets\pylintgui.py", line 37, in 
from spyder.plugins.pylint.utils import get_pylintrc_path
File "C:\Users\ASUS\Anaconda3\lib\site-packages\spyder\plugins\pylint\utils.py", line 16, in 
import pylint.config
File "C:\Users\ASUS\Anaconda3\lib\site-packages\pylint\config.py", line 54, in 
import toml
ModuleNotFoundError: No module named 'toml'

Versions

  • Spyder version: 4.1.2
  • Python version: 3.7
  • Qt version:
  • PyQt version:
  • Operating System name/version: Windows 10

Dependencies

PASTE DEPENDENCIES HERE
@goanpeca
Copy link
Member

goanpeca commented Apr 30, 2020

Hi @srvmig Its seems the module toml is not installed.

Please run

conda install toml spyder=4.1.2

and try again

Cheers!

@srvmig
Copy link
Author

srvmig commented Apr 30, 2020

Worked !! Thanks.....

@srvmig srvmig closed this as completed Apr 30, 2020
@goanpeca
Copy link
Member

Glad it worked out!

@maximlt
Copy link

maximlt commented May 1, 2020

Not sure this issue should be close @goanpeca . I just had the same error ModuleNotFoundError: No module named 'toml' after I tried to install the last version of Spyder in a dedicated conda environment with conda create -n spyder spyder.

OS: Windows 10
conda: v4.8.3
Spyder: v4.1.2

conda list
Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0  
argh                      0.26.2                   py38_0  
asn1crypto                1.3.0                    py38_0  
astroid                   2.3.3                    py38_0  
atomicwrites              1.3.0                      py_0  
attrs                     19.3.0                     py_0  
autopep8                  1.4.4                      py_0  
babel                     2.8.0                      py_0  
backcall                  0.1.0                    py38_0  
bcrypt                    3.1.7            py38he774522_0  
bleach                    3.1.4                      py_0  
ca-certificates           2020.1.1                      0  
certifi                   2020.4.5.1               py38_0  
cffi                      1.14.0           py38h7a1dbc1_0  
chardet                   3.0.4                 py38_1003  
cloudpickle               1.4.0                      py_0  
colorama                  0.4.3                      py_0  
cryptography              2.8              py38h7a1dbc1_0  
decorator                 4.4.2                      py_0  
defusedxml                0.6.0                      py_0  
diff-match-patch          20181111                   py_0  
docutils                  0.16                     py38_0  
entrypoints               0.3                      py38_0  
flake8                    3.7.9                    py38_0  
future                    0.18.2                   py38_0  
icu                       58.2                 ha925a31_3  
idna                      2.9                        py_1  
imagesize                 1.2.0                      py_0  
importlib_metadata        1.5.0                    py38_0  
intervaltree              3.0.2                      py_0  
ipykernel                 5.1.4            py38h39e3cac_0  
ipython                   7.13.0           py38h5ca1d4c_0  
ipython_genutils          0.2.0                    py38_0  
isort                     4.3.21                   py38_0  
jedi                      0.15.2                   py38_0  
jinja2                    2.11.2                     py_0  
jpeg                      9b                   hb83a4c4_2  
jsonschema                3.2.0                    py38_0  
jupyter_client            6.1.2                      py_0  
jupyter_core              4.6.3                    py38_0  
keyring                   21.1.1                   py38_2  
lazy-object-proxy         1.4.3            py38he774522_0  
libpng                    1.6.37               h2a8f88b_0  
libsodium                 1.0.16               h9d3ae62_0  
libspatialindex           1.9.3                h33f27b4_0  
markupsafe                1.1.1            py38he774522_0  
mccabe                    0.6.1                    py38_1  
mistune                   0.8.4           py38he774522_1000  
nbconvert                 5.6.1                    py38_0  
nbformat                  5.0.4                      py_0  
numpydoc                  0.9.2                      py_0  
openssl                   1.1.1g               he774522_0  
packaging                 20.3                       py_0  
pandoc                    2.2.3.2                       0  
pandocfilters             1.4.2                    py38_1  
paramiko                  2.7.1                      py_0  
parso                     0.5.2                      py_0  
pathtools                 0.1.2                      py_1  
pexpect                   4.8.0                    py38_0  
pickleshare               0.7.5                 py38_1000  
pip                       20.0.2                   py38_1  
pluggy                    0.13.1                   py38_0  
prompt-toolkit            3.0.4                      py_0  
prompt_toolkit            3.0.4                         0  
psutil                    5.7.0            py38he774522_0  
pycodestyle               2.5.0                    py38_0  
pycparser                 2.20                       py_0  
pydocstyle                4.0.1                      py_0  
pyflakes                  2.1.1                    py38_0  
pygments                  2.6.1                      py_0  
pylint                    2.5.0                    py38_0  
pynacl                    1.3.0            py38h62dcd97_0  
pyopenssl                 19.1.0                   py38_0  
pyparsing                 2.4.6                      py_0  
pyqt                      5.9.2            py38ha925a31_4  
pyrsistent                0.16.0           py38he774522_0  
pysocks                   1.7.1                    py38_0  
python                    3.8.2               h5fd99cc_11  
python-dateutil           2.8.1                      py_0  
python-jsonrpc-server     0.3.4                      py_0  
python-language-server    0.31.10                  py38_0  
pytz                      2019.3                     py_0  
pywin32                   227              py38he774522_1  
pywin32-ctypes            0.2.0                 py38_1000  
pyyaml                    5.3.1            py38he774522_0  
pyzmq                     18.1.1           py38ha925a31_0  
qdarkstyle                2.8.1                      py_0  
qt                        5.9.7            vc14h73c81de_0  
qtawesome                 0.7.0                      py_0  
qtconsole                 4.7.3                      py_0  
qtpy                      1.9.0                      py_0  
requests                  2.23.0                   py38_0  
rope                      0.16.0                     py_0  
rtree                     0.9.3            py38h21ff451_0  
setuptools                46.1.3                   py38_0  
sip                       4.19.13          py38ha925a31_0  
six                       1.14.0                   py38_0  
snowballstemmer           2.0.0                      py_0  
sortedcontainers          2.1.0                    py38_0  
sphinx                    3.0.3                      py_0  
sphinxcontrib-applehelp   1.0.2                      py_0  
sphinxcontrib-devhelp     1.0.2                      py_0  
sphinxcontrib-htmlhelp    1.0.3                      py_0  
sphinxcontrib-jsmath      1.0.1                      py_0  
sphinxcontrib-qthelp      1.0.3                      py_0  
sphinxcontrib-serializinghtml 1.1.4                      py_0  
spyder                    4.1.2                    py38_0  
spyder-kernels            1.9.0                    py38_0  
sqlite                    3.31.1               h2a8f88b_1  
testpath                  0.4.4                      py_0  
tornado                   6.0.4            py38he774522_1  
traitlets                 4.3.3                    py38_0  
ujson                     1.35             py38he774522_0  
urllib3                   1.25.8                   py38_0  
vc                        14.1                 h0510ff6_4  
vs2015_runtime            14.16.27012          hf0eaf9b_1  
watchdog                  0.10.2                   py38_0  
wcwidth                   0.1.9                      py_0  
webencodings              0.5.1                    py38_1  
wheel                     0.34.2                   py38_0  
win_inet_pton             1.1.0                    py38_0  
wincertstore              0.2                      py38_0  
wrapt                     1.12.1           py38he774522_1  
yaml                      0.1.7                hc54c509_2  
yapf                      0.28.0                     py_0  
zeromq                    4.3.1                h33f27b4_3  
zipp                      3.1.0                      py_0  
zlib                      1.2.11               h62dcd97_4  

@goanpeca
Copy link
Member

goanpeca commented May 1, 2020

Hello, it is a problem with the latest pylint package released by Anaconda so while a new package is fixed and released, this issue will persist and the “solution” is to install toml manually in the meantime.

@goanpeca
Copy link
Member

goanpeca commented May 1, 2020

I updated the recipe and pinged the Anaconda devs, so we hopefully have a fix soon:
conda-forge/pylint-feedstock#42

@CAM-Gerlach
Copy link
Member

@goanpeca Just to note, this was particularly worrysome for users on Windows since when launching Spyder from the shortcut (our recommended method on that platform), Spyder appears to launch, the splash screen shows, but then at the point near when it usually vanishes to show the mainwindow UI, it silently exits instead leaving the user with no indication of what happened that would lead them here to the fix; I didn't get a "Spyder failed to start" dialog despite many restarts.

As a Spyder core dev who has troubleshooted and helped resolve hundreds, perhaps thousands of different issues like this, it only took a couple minutes to diagnose and solve but I worry the average user without that fortunate experience might find it far more frustrating. Maybe there's something we can do to improve this UX?

@goanpeca
Copy link
Member

goanpeca commented May 4, 2020

Maybe we could add an additional icon to open Spyder in debug mode on windows?

What do you think @ccordoba12

@ccordoba12
Copy link
Member

That wouldn't work in this case because Spyder doesn't even start due to this issue.

The only solution that occurs to me is to use self-contained, well-tested installers that won't be affected by this kind of bugs.

@CAM-Gerlach, do you have something else in mind?

@CAM-Gerlach
Copy link
Member

That wouldn't work in this case because Spyder doesn't even start due to this issue.

Yeah; the fundamental issue is that no feedback at all is presented to the user when Spyder fails to start early enough in initialization, at least before the mainwindow GUI is displayed, unless its run from a terminal.

@CAM-Gerlach, do you have something else in mind?

Not sure; the installers as discussed will hopefully mitigate most startup issues once and for all, but even with full control over the Python level of the environment and ignoring random corruption and deliberate user action, there is always a chance of an error occurring at some point during initialization due to something in the user's/OS/machine environment outside of our direct control.

In the case of a startup failure, IMO the UX priority is to at least convey to the user that A. An error occurred, and B. Enough information (error message, traceback, etc) to Google or report it. Right now on Windows with the shortcut, there is no feedback, Spyder simply never launches. I had no idea it was even an error until I ran it from the command line, since Spyder went through the normal splash screen process but then the GUI never displayed, so I didn't have a way to know what had actually happened or (without running it in the command line, which the average user may not know to do) what to do about it.

I'll open a new issue discussing this further and some postulated solutions, as we discussed in our call. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants