gpt4 book ai didi

python - 为什么 IPython QtConsole 没有启动?

转载 作者:太空狗 更新时间:2023-10-30 01:33:59 26 4
gpt4 key购买 nike

我已经按照安装页面中的说明使用“pip install ipython[all]”安装了 ipython,还使用自制软件(qt、pyqt 和 sip)安装了 qtconsole 依赖项。但是,当我尝试使用“ipython qtconsole”从终端启动 qtconsole 时,我收到以下错误消息:

Traceback (most recent call last):
File "/Users/***/.virtualenvs/data-analysis/bin/ipython", line 11, in <module>
sys.exit(start_ipython())
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/config/application.py", line 563, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/core/application.py", line 381, in initialize
self.parse_command_line(argv)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 316, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/config/application.py", line 475, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/config/application.py", line 406, in initialize_subcommand
subapp = import_item(subapp)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/qt/console/qtconsoleapp.py", line 58, in <module>
from IPython.external.qt import QtCore, QtGui
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/external/qt.py", line 23, in <module>
QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
File "/Users/***/.virtualenvs/data-analysis/lib/python2.7/site-packages/IPython/external/qt_loaders.py", line 258, in load_qt
api_options))
ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7 or PySide >= 1.0.3 is available,
and only one is imported per session.

Currently-imported Qt library: None
PyQt4 installed: False
PySide >= 1.0.3 installed: False
Tried to load: ['pyside', 'pyqt']

这里出了什么问题?任何帮助将不胜感激。

最佳答案

错误消息说您既没有安装 PyQt4 也没有安装 PySide >=1.0.3。您应该检查正确安装的两个软件包之一。你说你安装了 pyqt 但你得到了错误。也许,它是 pyqt 版本 3。PyQt 版本 4 有不同的名称,例如 PyQt4。在这种情况下,您应该安装 pyqt4。

关于python - 为什么 IPython QtConsole 没有启动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26321039/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com