1

I have this issue. I have spyder running without any environment (version 5.2.x). When I add it to poetry env (poetry add spyder --group dev), it doesn't work. Next is the output:

  fromIccProfile: failed minimal tag size sanity
  Traceback (most recent call last):
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/bin/spyder", line 8, in <module>
    sys.exit(main())
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/spyder/app/start.py", line 256, in main
    mainwindow.main(options, args)
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/spyder/app/mainwindow.py", line 1823, in main
    mainwindow = create_window(MainWindow, app, splash, options, args)
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/spyder/app/utils.py", line 289, in create_window
    main.setup()
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/spyder/app/mainwindow.py", line 732, in setup
    internal_plugins = find_internal_plugins()
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/spyder/app/find_plugins.py", line 40, in find_internal_plugins
    mod = importlib.import_module(entry_point.module_name)
  File "/home/vladimir/.pyenv/versions/3.10.0/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/spyder/plugins/editor/plugin.py", line 49, in <module>
    from spyder.plugins.editor.widgets.codeeditor import CodeEditor
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/spyder/plugins/editor/widgets/codeeditor.py", line 33, in <module>
    from IPython.core.inputtransformer2 import TransformerManager
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/IPython/__init__.py", line 53, in <module>
    from .terminal.embed import embed
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/IPython/terminal/embed.py", line 15, in <module>
    from IPython.core.interactiveshell import DummyMod, InteractiveShell
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 73, in <module>
    from IPython.core.history import HistoryManager
  File "/home/vladimir/.cache/pypoetry/virtualenvs/nptprediction-fB9y5jZ9-py3.10/lib/python3.10/site-packages/IPython/core/history.py", line 11, in <module>
    import sqlite3
  File "/home/vladimir/.pyenv/versions/3.10.0/lib/python3.10/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/home/vladimir/.pyenv/versions/3.10.0/lib/python3.10/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

I really don't know what is happening.

sinoroc
  • 18,409
  • 2
  • 39
  • 70
vladimir
  • 41
  • 3
  • Does this help? https://stackoverflow.com/q/1210664 – sinoroc Apr 14 '23 at 08:21
  • It does not work. – vladimir Apr 14 '23 at 21:37
  • This is the output of what? What command? – sinoroc Apr 15 '23 at 14:59
  • The command is >poetry run spyder, after >poetry add spyder --group dev – vladimir Apr 15 '23 at 15:17
  • 1
    You need to insert this very important detail into your question at the right place (not as an edit at the end of the question). – sinoroc Apr 15 '23 at 15:28
  • 1
    Why do you want to call Spyder from a poetry env, since you're already using it stand-alone? A better option in my eyes could be to go to Preferences -> Python interpreter -> Use the following... -> set the poetry env Python binary there. You might need to add `spyder-kernels` as a dependency to your pyproject.toml for this to work. – FObersteiner Apr 15 '23 at 15:43

0 Answers0