1

My Spyder (version 4.0) crashed and spyder --reset has no use. I tried conda update spyder and then when I open Spyder in the Anaconda Prompt, it would show these:

    Traceback (most recent call last):
  File "E:\Anaconda\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "E:\Anaconda\lib\site-packages\spyder\app\start.py", line 205, in main
    mainwindow.main()
  File "E:\Anaconda\lib\site-packages\spyder\app\mainwindow.py", line 3748, in main
    mainwindow = run_spyder(app, options, args)
  File "E:\Anaconda\lib\site-packages\spyder\app\mainwindow.py", line 3623, in run_spyder
    main.setup()
  File "E:\Anaconda\lib\site-packages\spyder\app\mainwindow.py", line 945, in setup
    from spyder.plugins.ipythonconsole.plugin import IPythonConsole
  File "E:\Anaconda\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 46, in <module>
    from spyder.plugins.ipythonconsole.widgets import (ClientWidget,
  File "E:\Anaconda\lib\site-packages\spyder\plugins\ipythonconsole\widgets\__init__.py", line 16, in <module>
    from .debugging import DebuggingWidget
  File "E:\Anaconda\lib\site-packages\spyder\plugins\ipythonconsole\widgets\debugging.py", line 15, in <module>
    from IPython.core.history import HistoryManager
  File "E:\Anaconda\lib\site-packages\IPython\__init__.py", line 56, in <module>
    from .terminal.embed import embed
  File "E:\Anaconda\lib\site-packages\IPython\terminal\embed.py", line 16, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "E:\Anaconda\lib\site-packages\IPython\terminal\interactiveshell.py", line 19, in <module>
    from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode
ModuleNotFoundError: No module named 'prompt_toolkit.enums'

But I could not conda install prompt_toolkit.enums because it showed:

Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - prompt_toolkit.enums

Current channels:

  - 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

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

And prompt_toolkit has been reinstalled by me. But there was still nothing useful. I just add the output of conda list prompt_toolkit as follows:

# packages in environment at E:\Anaconda:
#
# Name                    Version                   Build  Channel
prompt_toolkit            3.0.5                         0

Anybody who can help me? Please!!! I am just wanting to use Spyder normally!

fortune
  • 11
  • 3

1 Answers1

3

Maybe your prompt_toolkit version is too high, which is incompatible with your ipython version.
You can try install prompt_toolkit 2.xx.

May Guo
  • 31
  • 1