首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行pyqt4时ipython中的pyside morphotester.py冲突

运行pyqt4时ipython中的pyside morphotester.py冲突
EN

Stack Overflow用户
提问于 2016-11-01 17:15:58
回答 1查看 970关注 0票数 1

尝试在冠层中运行包时,当我运行包时,它会导致冲突,因为pyside似乎是默认的,而包则调用pyqt4,我如何在Ipython中禁用pyside,或者以其他方式处理这个问题?

代码语言:javascript
复制
%run "C:\Users\Tom\Desktop\morphotester-master\morphotester-master\Morpho.py"
C:\Users\Tom\AppData\Local\Enthought\Canopy\User\lib\site-packages\matplotlib\__init__.py:1350: UserWarning:  This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)
WARNING:traits.has_traits:DEPRECATED: traits.has_traits.wrapped_class, 'the 'implements' class advisor has been deprecated. Use the 'provides' class decorator.
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
C:\Users\Tom\Desktop\morphotester-master\morphotester-master\Morpho.py in <module>()
     25 from mayavi.core.ui.api import MlabSceneModel
     26 from tvtk.pyface.scene_editor import SceneEditor
---> 27 from PyQt4 import QtGui
     28 
     29 class MainWidget(QtGui.QWidget):

C:\Users\Tom\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.2.3262.win-x86_64\lib\site-packages\IPython\external\qt_loaders.pyc in load_module(self, fullname)

ImportError: 
    Importing PyQt4 disabled by IPython, which has
    already imported an Incompatible QT Binding: pyside
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-11-01 19:24:26

在Canopy / Edit / Preferences / Python中,禁用Pylab模式,或将其设置为“内联(SVG)”

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40365151

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档