Spyder: Spyder 4.1.2 won't load from Anaconda

Created on 30 Apr 2020  ยท  4Comments  ยท  Source: spyder-ide/spyder

Issue Report Checklist

  • [x] Searched the issues page for similar reports
  • [x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • [x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • [ ] Could not reproduce inside jupyter qtconsole (if console-related)
  • [x] Tried basic troubleshooting (if a bug/error)

    • [x] Restarted Spyder

    • [x] Reset preferences with spyder --reset

    • [x] Reinstalled the latest version of Anaconda

    • [x] Tried the other applicable steps from the Troubleshooting Guide

  • [x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

I am unable to launch Spyder from conda. I've recently upgraded to 4.1.2 and not sure how to fix this. I am newer on python and Anaconda and would appreciate someone's help.

I have already tried some of the solutions seen online, such as:

  • conda update jupyter_client
  • conda update jupyter_core

When i run one of the options above it runs and doesn't seem to end.
I've have also tried running - conda install anaconda that completed sucessfully but hasn't fixed the issue.

Pulling the little hairs out I have left. Please help expert community :)

What steps reproduce the problem?

  1. From anaconda prompt: conda spyder


    1. 3.

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

For Spyder to open

Paste Traceback/Error Below (if applicable)

(base) C:\WINDOWS\system32>spyder
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 205, in main
    mainwindow.main()
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3734, in main
    mainwindow = run_spyder(app, options, args)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3590, in run_spyder
    main.setup()
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 939, in setup
    from spyder.plugins.ipythonconsole.plugin import IPythonConsole
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 24, in <module>
    from jupyter_client.connect import find_connection_file
  File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
    from .connect import *
  File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 35, in <module>
    from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
ImportError: cannot import name 'secure_write'

Versions

  • Spyder version: 4.1.2
  • Python version: 3.6.3
  • Qt version: 5.6.2
  • PyQt version: 5.6.0
  • Operating System name/version: 64-bit OS, x64-based processor/Windows 10 Enterprise, version 1809

Dependencies

atomicwrites >=1.2.0 chardet >=2.0.0 cloudpickle >=0.5.0 diff-match-patch >=20181111 intervaltree jedi 0.15.2.* keyring nbconvert >=4.0 numpydoc >=0.6.0 paramiko >=2.4.0 parso 0.5.2.* pexpect >=4.4.0 pickleshare >=0.4 psutil >=5.3 pygments >=2.0 pylint >=0.25 pyqt >=5.6,<5.13 python >=3.7,<3.8.0a0 python-language-server >=0.31.9,<0.32.0 pyzmq >=17 qdarkstyle >=2.8 qtawesome >=0.5.7 qtconsole >=4.6.0 qtpy >=1.5.0 rtree >=0.8.3 sphinx >=0.6.6 spyder-kernels >=1.9.0,<1.10.0 watchdog

Most helpful comment

After a lot of trial and error, i finally uninstalled my version of anaconda3 (wich was pushed to me by my work) and tried simply reinstalling Anaconda3-2020.02-Windows-x86_64 (latest version). This packaged installed Spyder 4.0.1 which works! It's not 4.1.2, which I painfully was trying to get. I'm happy with my current root environment, i will try copying this environment tomorrow and see if i can upgrade Spyder successfully and will provide an update.

All 4 comments

After a lot of trial and error, i finally uninstalled my version of anaconda3 (wich was pushed to me by my work) and tried simply reinstalling Anaconda3-2020.02-Windows-x86_64 (latest version). This packaged installed Spyder 4.0.1 which works! It's not 4.1.2, which I painfully was trying to get. I'm happy with my current root environment, i will try copying this environment tomorrow and see if i can upgrade Spyder successfully and will provide an update.

Glad to see you found a workaround. Let us know how it went. Cheers!

Unfortunately, no luck. Got the following error report which i sent to the core maintainers. I recommend to stay with 4.0.1 until issues are fixed.

(main_env) C:\Users----->conda install spyder=4.1.2
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining defaults/win-64::sphinxcontrib==1.0=py37_1: 21%|โ–ˆโ–ˆโ–ˆโ–ˆโ–‰ | 63/297 [00:01<00:06, 38.71it/s]\Examining defaults/win-64::boto==2.49.0=py37_0: 29%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 86/297 [00:02<00:15, 13.70it/s]|Examining defaults/noarch::sphinxcontrib-applehelp==1.0.1=py_0: 31%|โ–ˆโ–ˆโ–ˆโ–ˆ | 92/297 [00:02<00:11, 17.71it/s]/Examining defaults/noarch::diff-match-patch==20181111=py_0: 51%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ | 150/297 [00:04<00:03, 42.11it/s]\Examining defaults/noarch::networkx==2.4=py_0: 66%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 196/297 [00:05<00:02, 41.44it/s]\Examining defaults/noarch::more-itertools==8.2.0=py_0: 69%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Œ | 206/297 [00:05<00:02, 37.43it/s]|Examining defaults/noarch::autopep8==1.4.4=py_0: 72%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 214/297 [00:05<00:01, 47.46it/s]/Examining defaults/win-64::xlrd==1.2.0=py37_0: 74%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 220/297 [00:05<00:01, 46.50it/s]-Examining defaults/win-64::get_terminal_size==1.0.0=h38e98db_0: 83%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‰ | 246/297 [00:06<00:01, 25.94it/s]-Examining defaults/win-64::conda-package-handling==1.6.0=py37h62dcd97_0: 92%|โ–ˆโ–ˆโ–‹| 272/297 [00:07<00:00, 40.13it/s]/Examining defaults/win-64::mkl==2020.0=166: 94%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 280/297 [00:07<00:00, 46.88it/s]-Examining defaults/win-64::bkcharts==0.2=py37_0: 97%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Ž| 289/297 [00:07<00:00, 41.45it/s]\Examining defaults/win-64::pathlib2==2.3.5=py37_0: 99%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‹| 293/297 [00:07<00:00, 24.38it/s]|failed

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\cli\install.py", line 265, in install
    should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
    should_retry_solve)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
    force_remove, should_retry_solve)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 281, in solve_final_state
    ssc = self._run_sat(ssc)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
    return f(*args, **kwds)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 808, in _run_sat
    should_retry_solve=ssc.should_retry_solve
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
    return f(*args, **kwds)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\resolve.py", line 1316, in solve
    raise UnsatisfiableError({})
conda.exceptions.UnsatisfiableError:
Did not find conflicting dependencies. If you would like to know which
packages conflict ensure that you have enabled unsatisfiable hints.

conda config --set unsatisfiable_hints True


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
    return getattr(module, func_name)(args, parser)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\cli\install.py", line 299, in install
    should_retry_solve=(repodata_fn != repodata_fns[-1]),
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
    should_retry_solve)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
    force_remove, should_retry_solve)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 281, in solve_final_state
    ssc = self._run_sat(ssc)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
    return f(*args, **kwds)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\core\solve.py", line 808, in _run_sat
    should_retry_solve=ssc.should_retry_solve
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
    return f(*args, **kwds)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\resolve.py", line 1318, in solve
    self.find_conflicts(specs, specs_to_add, history_specs)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\resolve.py", line 347, in find_conflicts
    bad_deps = self.build_conflict_map(specs, specs_to_add, history_specs)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\resolve.py", line 507, in build_conflict_map
    root, search_node, dep_graph, num_occurances)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\resolve.py", line 369, in breadth_first_search_for_dep_graph
    last_spec = MatchSpec.union((path[-1], target_paths[-1][-1]))[0]
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 481, in union
    return cls.merge(match_specs, union=True)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 475, in merge
    reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 475, in <lambda>
    reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 502, in _merge
    final = this_component.union(that_component)
  File "C:\Users\-----\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 764, in union
    return '|'.join(options)
TypeError: sequence item 0: expected str instance, MultiChannel found

$ C:\Users\-----\Anaconda3\Scripts\conda-script.py install spyder=4.1.2

environment variables:
CIO_TEST=
CONDA_DEFAULT_ENV=main_env
CONDA_EXE=C:\Users-----\Anaconda3\condabin..\Scripts\conda.exe
CONDA_EXES="C:\Users-----\Anaconda3\condabin..\Scripts\conda.exe"
CONDA_PREFIX=C:\Users-----\Anaconda3\envs\main_env
CONDA_PREFIX_1=C:\Users-----\Anaconda3
CONDA_PROMPT_MODIFIER=(main_env)
CONDA_PYTHON_EXE=C:\Users-----\Anaconda3\python.exe
CONDA_ROOT=C:\Users-----\Anaconda3
CONDA_SHLVL=2
HOMEPATH=\Users-----
PATH=C:\Users-----\Anaconda3;C:\Users-----\Anaconda3\Library\mingw-w64\bi
n;C:\Users-----\Anaconda3\Library\usr\bin;C:\Users-----\Anaconda3\Li
brary\bin;C:\Users-----\Anaconda3\Scripts;C:\Users-----\Anaconda3\bi
n;C:\Users-----\Anaconda3\envs\main_env;C:\Users-----\Anaconda3\envs
\main_env\Library\mingw-w64\bin;C:\Users-----\Anaconda3\envs\main_env
\Library\usr\bin;C:\Users-----\Anaconda3\envs\main_env\Library\bin;C:
\Users-----\Anaconda3\envs\main_env\Scripts;C:\Users-----\Anaconda3\
envs\main_env\bin;C:\Users-----\Anaconda3\condabin;C:\ProgramData\Ora
cle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
bem;C:\WINDOWS\System32\WindowsPowerShellv1.0;Z:\;C:\Program
Files\MATLAB\R2018b\bin;C:\WINDOWS\System32\OpenSSH;C:\Program Files
(x86)\Microsoft SQL Server\150\DTS\Binn;C:\ProgramData\Oracle\Java\jav
apath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDO
WS\System32\WindowsPowerShellv1.0;Z:\;C:\Program
Files\MATLAB\R2018b\bin;C:\WINDOWS\System32\OpenSSH;C:\Program Files
(x86)\Microsoft SQL Server\150\DTS\Binn;C:\ProgramData\Oracle\Java\jav
apath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDO
WS\System32\WindowsPowerShellv1.0;Z:\;C:\Program
Files\MATLAB\R2018b\bin;C:\WINDOWS\System32\OpenSSH;C:\Program Files
(x86)\Microsoft SQL Server\150\DTS\Binn;C:\Users-----\AppData\Local\M
icrosoft\WindowsApps;.;C:\Python34\Scripts;C:\Program
Files\Python36\Scripts
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows
PowerShellv1.0\Modules
PYTHONPATH=C:\Users-----\AppData\Local\conda\conda\envs\main_env\Lib\site-
packages\plotly
REQUESTS_CA_BUNDLE=
SSL_CERT_FILE=

 active environment : main_env
active env location : C:\Users\-----\Anaconda3\envs\main_env
        shell level : 2
   user config file : C:\Users\-----\.condarc

populated config files : C:\Users-----.condarc
conda version : 4.8.2
conda-build version : 3.18.11
python version : 3.7.6.final.0
virtual packages :
base environment : C:\Users-----\Anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users-----\Anaconda3\pkgs
C:\Users-----.conda\pkgs
C:\Users-----\AppData\Local\conda\conda\pkgs
envs directories : C:\Users-----\Anaconda3\envs
C:\Users-----.conda\envs
C:\Users-----\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?

Upload successful.

Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running

$ conda config --set report_errors true

Hello!
I was having the same issue, I tried to update conda first and then ran again and it worked
conda update --all

Was this page helpful?
0 / 5 - 0 ratings