gpt4 book ai didi

python - 加载 ipython qtconsole 时出错

转载 作者:太空狗 更新时间:2023-10-30 02:45:10 25 4
gpt4 key购买 nike

我需要一些建议。我已经安装了 ipython (sudo pip install ipython[all])

我有 python 2.7,mac osx 10.9 64 位。

我正在尝试使用 qtconsole

camilo-mbp:mvc cami$ ipython qtconsole
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 8, in <module>
load_entry_point('ipython==2.2.0', 'console_scripts', 'ipython')()
File "/Library/Python/2.7/site-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 563, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/terminal/ipapp.py", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/core/application.py", line 381, in initialize
self.parse_command_line(argv)
File "/Library/Python/2.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 "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.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 "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 406, in initialize_subcommand
subapp = import_item(subapp)
File "/Library/Python/2.7/site-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/Library/Python/2.7/site-packages/IPython/qt/console/qtconsoleapp.py", line 58, in <module>
from IPython.external.qt import QtCore, QtGui
File "/Library/Python/2.7/site-packages/IPython/external/qt.py", line 23, in <module>
QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
File "/Library/Python/2.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']

我已经完成了以下命令来将安装的 pyQt4 设置为 True 并且工作正常

export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH

现在,我想安装 pyside,但出现了一些错误:

camilo-mbp:mvc cami$ pip install pyside
Downloading/unpacking pyside
Downloading PySide-1.2.2.tar.gz (9.3MB): 9.3MB downloaded
Running setup.py egg_info for package pyside
Removing /private/var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip_build_cami/pyside/pyside_package

package init file 'pyside_package/PySide/__init__.py' not found (or not a regular file)
package init file 'pyside_package/pysideuic/__init__.py' not found (or not a regular file)
warning: no previously-included files matching '**' found under directory 'sources/pyside-examples/examples/hyperui'
warning: no previously-included files matching '**' found under directory 'sources/pyside-examples/mobility'
warning: no previously-included files matching '**' found under directory 'sources/shiboken/.git'
warning: no previously-included files matching '**' found under directory 'sources/pyside/.git'
warning: no previously-included files matching '**' found under directory 'sources/pyside-tools/.git'
warning: no previously-included files matching '**' found under directory 'sources/pyside-examples/.git'
warning: no files found matching '**' under directory 'pyside_package/PySide'
warning: no files found matching '**' under directory 'pyside_package/PySide/docs'
warning: no files found matching '**' under directory 'pyside_package/PySide/plugins'
warning: no files found matching '**' under directory 'pyside_package/PySide/imports'
warning: no files found matching '**' under directory 'pyside_package/PySide/translations'
warning: no files found matching '**' under directory 'pyside_package/PySide/include'
warning: no files found matching '**' under directory 'pyside_package/PySide/typesystems'
warning: no files found matching '**' under directory 'pyside_package/PySide/examples'
warning: no files found matching '**' under directory 'pyside_package/pysideuic'
warning: no files found matching '**' under directory 'pyside_package/pysideuic/Compiler'
warning: no files found matching '**' under directory 'pyside_package/pysideuic/port_v2'
warning: no files found matching '**' under directory 'pyside_package/pysideuic/port_v3'
warning: no files found matching '**' under directory 'pyside_package/pysideuic/widget-plugins'
Installing collected packages: pyside
Running setup.py install for pyside
Removing /private/var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip_build_cami/pyside/pyside_package
Python architecture is 64bit
error: Failed to find cmake. Please specify the path to cmake with --cmake parameter.
Complete output from command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/private/var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip_build_cami/pyside/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip-AjpsAb-record/install-record.txt --single-version-externally-managed:
Removing /private/var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip_build_cami/pyside/pyside_package

running install

running build

Python architecture is 64bit

error: Failed to find cmake. Please specify the path to cmake with --cmake parameter.

----------------------------------------
Cleaning up...
Command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python - c "import setuptools;__file__='/private/var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip_build_cami/pyside/s etup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install -- record /var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip-AjpsAb-record/install-record.txt -- single-version-externally-managed failed with error code 1 in /private/var/folders/y3/xwgxtgzs27z5mwzhpmw244d00000gp/T/pip_build_cami/pyside
Storing complete log in /Users/cami/Library/Logs/pip.log

我尝试安装 cmake

camilo-mbp:mvc cami$ pip install cmake
Downloading/unpacking cmake
Could not find any downloads that satisfy the requirement cmake
Cleaning up...
No distributions at all found for cmake
Storing complete log in /Users/cami/Library/Logs/pip.log
camilo-mbp:mvc cami$

我还应该做什么?

提前致谢

最佳答案

据我所知,cmake 不是 python 包。它是一个构建工具。因此,您所要做的就是安装它。你可以从这里得到它:CMake site

此外,您应该检查 Apple 开发工具是否已经有 cmake。

关于python - 加载 ipython qtconsole 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25752315/

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