【问题标题】:Spyder crashes in Manjaro KDESpyder 在 Manjaro KDE 中崩溃
【发布时间】:2020-09-12 17:45:27
【问题描述】:

Spyder 在 Manjaro KDE 中崩溃并出现以下错误:

    Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/qtpy/__init__.py", line 204, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/spyder3", line 3, in <module>
    start.main()
  File "/usr/lib/python3.8/site-packages/spyder/app/start.py", line 200, in main
    from spyder.app import mainwindow
  File "/usr/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 54, in <module>
    requirements.check_qt()
  File "/usr/lib/python3.8/site-packages/spyder/requirements.py", line 41, in check_qt
    import qtpy
  File "/usr/lib/python3.8/site-packages/qtpy/__init__.py", line 210, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

PyQt5 和 PySide 已安装,但我仍然收到错误消息。我已经尝试在 pamac 和 pip 中安装其他 spyder 版本,但遇到了同样的错误。

提前感谢您的帮助。

【问题讨论】:

    标签: python pyqt5 spyder pyside pyside2


    【解决方案1】:

    看起来正在使用的 python 不是 anaconda 的:

    File "/usr/lib/python3.8/site-packages/qtpy/__init__.py"
    

    尝试执行以下操作:

    在你的终端里面写:

    // 这将停用基础环境

    //你需要:“conda reactivate”稍后再次使用 spyder

    conda deactivate
    

    然后做:

    pip install PyQt5 PySide
    

    然后:

    conda activate
    
    spyder
    

    【讨论】:

    • 感谢您的回答,但我没有安装 anaconda。正如你所说,我正在独立运行 Spyder。
    • 另外,当我使用 pip 安装 PySide 时,出现以下错误:ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5isuaumb/PySide/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5isuaumb/PySide/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gs1r79jt
    • cwd: /tmp/pip-install-5isuaumb/PySide/ Complete output (1 lines): only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)] ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    • 您拥有哪个版本的 Spyder?试试这个: pip install PySide2 你可能还需要安装这个:build-system.fman.io/qt-designer-download
    猜你喜欢
    • 2021-12-09
    • 2013-07-07
    • 1970-01-01
    • 2018-12-20
    • 2022-07-14
    • 1970-01-01
    • 2020-11-11
    • 2018-06-11
    • 1970-01-01
    相关资源
    最近更新 更多