首页 \ 问答 \ 为什么SIP和PyQt4不相处(Why are SIP and PyQt4 not getting along)

为什么SIP和PyQt4不相处(Why are SIP and PyQt4 not getting along)

我在Windows中完成了大部分工作,并且设置了一个像我喜欢的python27。 我最近安装了virtualBox并运行了一个Ubuntu机器,并试图安装PyQt4。 我从apt-get安装并更新了所有内容,但是,当我尝试从PyQt4导入时

from PyQt4 import QtCore

我得到一个runtimeError:

RuntimeError: the sip module implements API v9.0 to v9.1 but the PyQt4.QtCore module requires API v8.1

我确信这是一个问题,我有知识基础要在Windows中解决,但是我的Linux经验不足在这里变得越来越好,并且我错误地安装了一些东西。 这个错误导致我相信我有一个SIP版本,对于我的PyQt版本来说太过幻想......任何人都有这方面的经验吗?

编辑 :如果我收到错误后再次尝试导入它似乎工作。 这样做,我获得了版本信息。

cfg.pyqt_version_str
Out[9]: '4.9.3'
cfg.sip_version_str
Out[10]: '4.14.3-snapshot-55188026fe6d'

不确定所有快照业务是关于什么的。


I do most of my work in Windows and have a good python27 set up like I like it. I recently installed virtualBox and got a Ubuntu Machine running on it and am trying to get PyQt4 installed on it. I installed from apt-get and updated everything, however, when I try to import from PyQt4

from PyQt4 import QtCore

I get a runtimeError:

RuntimeError: the sip module implements API v9.0 to v9.1 but the PyQt4.QtCore module requires API v8.1

I am sure this is a problem that I would have the knowledge base to solve in Windows, but my Linux inexperience is getting the better of me here and I have installed something incorrectly. The error leads me to believe I have a SIP version that is too fancy for my PyQt version...anybody have any experience with this?

Edit: If I try the import again after receiving the error it seems to work. Doing this I obtained the version info.

cfg.pyqt_version_str
Out[9]: '4.9.3'
cfg.sip_version_str
Out[10]: '4.14.3-snapshot-55188026fe6d'

Not sure what all that snapshot business is about.


原文:https://stackoverflow.com/questions/13981964
更新时间:2022-10-18 19:10

最满意答案

我不知道这是否是你想要的,但如果你正在谈论的导航栏有你可以点击的符号,这是要走的路:

\beamertemplatenavigationsymbolsempty

好笑,这是你第二次问这个....

顺便说一句,您可能想要检查这个建议,针对一个专注于LaTeX的问题/答案网站。


I don't know whether this is what you want, but if you are talking about the navigation bar which has the symbols you can click on, this is the way to go:

\beamertemplatenavigationsymbolsempty

Funny, that is the second time you ask this....

By the way, you might want to check this proposal for a question/answer website focusing on LaTeX.

相关问答

更多
  • 我不知道这是否是你想要的,但如果你正在谈论的导航栏有你可以点击的符号,这是要走的路: \beamertemplatenavigationsymbolsempty 好笑,这是你第二次问这个.... 顺便说一句,您可能想要检查这个建议,针对一个专注于LaTeX的问题/答案网站。 I don't know whether this is what you want, but if you are talking about the navigation bar which has the symbols you ...
  • Microsoft.Maps.loadModule('Microsoft.Maps.Themes.BingTheme', { callback: function() { map = new Microsoft.Maps.Map(document.getElementById('SDKmap'), { credentials: 'Your Bing Maps Key', theme: new Microsoft.Maps.Themes.BingTh ...
  • 这些帧是由命令\AtBeginSubsection{}和\AtBeginSection{} ,您可以在YAML前端重新定义,而不执行任何操作: --- header-includes: - \AtBeginSubsection{} - \AtBeginSection{} --- Those frames are produced by the commands \AtBeginSubsection{} and \AtBeginSection{}, which you can redefine in yo ...
  • 我通过使用natbib包找到答案并正确使用它,特别是通过将参考书目样式定义为前导码并定义一个空白函数newblock以便编译得很好。 序言应如下: \documentclass[pdf,10pt]{beamer} \usepackage[sort&compress,comma,super]{natbib} \bibliographystyle{apalike} % Or your specific bibliographystyle \def\newblock{} % To avoid a compil ...
  • 解决了!!! 我的鼻子是正确的,但我需要时间才能意识到: this.style.overflow = "hidden"; this.style.left = q/2+"px"; this.style.width = v+"px"; this.style.top = p+"px"; this.style.height = i+"px"; if(this.scrollHeight>this.offsetHeight) this.style.overflowY = "auto"; if(this.scro ...
  • 对于导航栏,您可以使用: [navigationController.navigationBar setTintColor:[UIColor redColor]; //Red as an example. 这会将导航栏的颜色和所有它的按钮着色为特定颜色,在本例中为红色。 也可以在Interface Builder中设置此属性。 如果您想进一步自定义它,可以通过对其进行子类化将UINavigationBar的背景设置为图像。 像这样...... 头文件。 #import @ ...
  • 您始终可以更改导航栏的颜色。 只需允许用户选择颜色(他/她想要)并将其存储在应用程序的某些部分。 您还可以允许用户使用RGB值设置颜色。 您必须从RGB值创建颜色。 喜欢这个 : UIColor *myColor = [UIColor colorWithRed:(45/255.0) green:(55/255.0) blue:(55/255.0) alpha:1]; 然后,您可以使用此代码使用该颜色修改导航栏: self.navigationController.navigationBar.tintCol ...
  • 如果我没有记错,这是由于放置在TToolBar中的其他非TToolButton控件的透明度的句柄,因此,如果将TLabel的“Transparent”属性设置为false,则竖线将消失。 If I recall correctly, this is due to the handle of transparency of other non TToolButton controls that are placed in the TToolBar and, for this reason, if you se ...
  • 有关如何在LaTeX的数学模式中更改字体尺寸,请参阅此答案 。 编辑 在beamer中指定字体大小与在其他LaTeX文档中指定它们没有什么不同。 要更改阵列的大小,您可以通过在align环境中添加命令来切换大小。 有效命令是\tiny , \scriptsize , \footnotesize , \small , \normalsize , \large , \Large , \huge和\Huge (可能还有更多)。 See this answer for how to change font dime ...
  • 当您使用position:fixed您从文档的实际流中删除了受影响的元素。 最快捷,最有效的解决方法是将您的内容包装在div中,并将其从页面顶部替换为与导航相同的数量...
    my nav stuff
    my content is here
    CSS: .fixed { position:fixed; height: 50px; } .my-pushed-content { ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)