文章目录

  • 一、项目场景
  • 二、解决办法

一、项目场景

在将 Ubuntu 升级到 22.04 后,常用的 Spyder 编辑器通过图标无法打开了,在 Terminal 中启动 Spyder 输出报错如下:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):File "/usr/bin/spyder", line 33, in <module>sys.exit(load_entry_point('spyder==4.2.1', 'gui_scripts', 'spyder')())File "/usr/lib/python3/dist-packages/spyder/app/start.py", line 213, in mainmainwindow.main(options, args)File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3624, in mainmainwindow = create_window(app, splash, options, args)File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3482, in create_windowmain.setup()File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 803, in setupself.completions = CompletionManager(self)File "/usr/lib/python3/dist-packages/spyder/plugins/completion/plugin.py", line 97, in __init__plugin_client = Plugin(self.main)File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/plugin.py", line 50, in __init__self.installer = KiteInstallerDialog(File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 287, in __init__self._integration_widget = KiteIntegrationInfo(self)File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 58, in __init__image = image.scaled(image_width, image_height, Qt.KeepAspectRatio,
TypeError: arguments did not match any overloaded call:scaled(self, int, int, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'scaled(self, QSize, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'

应该是由于 Ubuntu 升级到 22.04 后系统默认 Python 版本为 3.10.4,导致 PyQt 的配置出现了问题。


二、解决办法

修改 /usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py 文件,首先备份一份该文件:

suod cp /usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py /usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py.bak

接着修改该文件:

sudo gedit /usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py

修改内容如下,主要是注释部分代码:

第58行:

# image = image.scaled(image_width, image_height, Qt.KeepAspectRatio, Qt.SmoothTransformation)

第143行:

# install_gif.setScaledSize(QSize(image_width, image_height))

第244-247行

# copilot_label.setPixmap(#    copilot_image.scaled(image_width, image_height,#                         Qt.KeepAspectRatio,#                         Qt.SmoothTransformation))

保存修改,问题解决。

Ubuntu22.04无法打开Spyder:TypeError: arguments did not match any overloaded call相关推荐

  1. TypeError: arguments did not match any overloaded call:问题的解决

    题名意思 TypeError:参数与任何重载调用不匹配: 发现问题 简而言之:你给的参数匹配不了任何规定的参数 解决 查看原函数说明 删除掉不希望的类型数据 有时候东西少点反而更好 有self参数反而 ...

  2. Pyqt报错:arguments did not match any overloaded call

    Pyqt报错:arguments did not match any overloaded call 详细报错信息: TypeError: arguments did not match any ov ...

  3. Ubuntu22.04安装详细教程 英伟达驱动安装教程 软件与更新无法打开 Ctrl+Alt+T打不开终端

    提示:文章记录了双系统(Windows+Ubuntu)的安装过程,本人电脑为Dell 文章目录 利用U盘安装Ubuntu22.04 1.插入U盘 2.前往Ubuntu官网下载22.04版本系统 3.下 ...

  4. Ubuntu22.04安装惠普P1108打印机并在局域网内共享

    Ubuntu22.04安装惠普P1108打印机 注:前期安装了smbsa用于文件共享. 一.安装打印机 1.1 版本 端口:USB 打印机型号:HP_LaserJet_Professional_P11 ...

  5. Ubuntu 系列学习(五)ubuntu22.04安装flameshot火焰截图(图文)

    文章目录 ubuntu22.04安装flameshot v11(火焰截图) 1 火焰截图flameshot安装 1.1 方法一 克隆项目编译安装 1.2 方法二 .deb包安装 1.3 添加依赖时的报 ...

  6. 在 Windows10 系统下重新安装 Ubuntu22.04 系统

    在 Windows10 系统下重新安装 Ubuntu22.04 系统 本文根据 tianyvHon 成功安装为背景,进行详细地讲解在 Windows10 系统下重新安装 Ubuntu22.04 系统. ...

  7. Ubuntu22.04 安装禅道

    Ubuntu22.04 安装禅道 Ubuntu22.04 在线安装 LAMP Ubuntu22.04 在线安装 MySQL8 MySQL APT存储库的下载页面 wget https://repo.m ...

  8. 从零开始安装ubuntu22.04并搭建远程深度学习环境

    文章目录 一.安装ubuntu22.04 1.制作ubuntu的启动U盘 2.安装ubuntu 3.更新并安装一些基本包 4.中文输入法 二.配置相关环境 1. 安装Nvidia驱动 2.安装anac ...

  9. 【嵌入式Linux开发一路清障-连载03】Ubuntu22.04使用Mount加载硬盘或NAS等硬盘

    Ubuntu22.04使用Mount加载硬盘或NAS等硬盘 障碍06-学习资料存储在NAS中,如何方便的访问NAS或其它硬盘中的资料呢? 摸索访问共享文件夹 利用文件系统中尝访问局域网中的共享文件夹( ...

最新文章

  1. open wrt 跟换主题_Openwrt编译进阶-修改密码、路由连接数、时区及主题
  2. 【 D3.js 入门系列 --- 2 】 怎样使用数据和选择元素
  3. Coursera公开课笔记: 斯坦福大学机器学习第六课“逻辑回归(Logistic Regression)”
  4. 夏天雷雨天机房断电了,该怎么办?,叫你几招紧急应对方法
  5. Python 爬取斗图啦图片
  6. datatables 响应式
  7. ubuntu终止terminal中下载任务以及继续下载
  8. Centos6.5 安装 Mysql-5.6.41
  9. Java多线程及锁相关面试题
  10. 关于greenplum(postgersql)日期为闰年闰月闰日的处理
  11. 《数据结构》陈越老师课后题详解
  12. 一种无法用言语表达的爱——父爱
  13. 将小写人民币转换成大写
  14. 北京医院张烜教授课题组招聘科研博士后
  15. 哈师大计算机学院2016级新生,【通知公告】哈尔滨师范大学2016—2017学年度国家励志奖学金获奖学生初审名单公示...
  16. WebRTC的拥塞控制技术(Congestion Control
  17. 提高自己的文字表达能力
  18. (2015)北京区域赛总结+回忆录
  19. ESL3.4 学习笔记(奇异值分解与拉格朗日乘子法下的岭回归,Lasso回归,最小角回归及三者对比分析)
  20. 红猫linux系统下载教程,RedCat_NSS_红猫linux软路由安装使用手册.doc

热门文章

  1. vue动画库-Animate.css的使用以及部分问题
  2. Tensorflow2.x读取手写体数字识别MNIST数据集
  3. 运筹学之线性规划与整数规划
  4. 音频耦合电容容值大小如何确定 音频地环路造成的噪声分析
  5. office 2007 鼠标、左右键失效
  6. console.read()的特殊用法及解决
  7. 2019中山大学计算机考研人数,中山大学2019考研报录情况汇总及分析
  8. Python-scapy(白帽)[ARP无法欺骗手机吗][DNS欺骗不了https吗]
  9. BLE蓝牙笔记----广播连接过程
  10. JS HTML转义码解码