当前位置: 首页 > article >正文

Debian arm系统安装wxPython

一、系统版本

二、安装wxPython-4.0.4.tar.gz

1、下载依赖

>sudo apt update
>sudo apt-get install build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libssl-dev libcurl4-openssl-dev libgstreamer-plugins-base1.0-dev libnotify-dev freeglut3 freeglut3-dev libtiff-dev -y

2、安装wxPython

下载 wxPython-404 源代码,解压,进入解压目录:

构建python包:>python3 build.py build

安装:>sudo python3 build.py install

三、打成whl

(1)安装wheel

>pip install wheel

(2)打包

>python3 setup.py bdist_wheel

最终生成/home/wxPython-4.2.1/dist/wxPython-4.2.1-cp37-cp37m-linux_aarch64.whl

四、常见问题

1、debian自带python3.7.3可以源码安装wxPython,但使用源码安装的python无法源码安装wxPython,只能使用whl。

报错如下:

源码安装python版本wxPython版本报错
3.64.0.4

ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "build.py", line 1321, in cmd_build_wx
    wxbuild.main(wxDir(), build_options)
  File "/home/wxPython-4.0.4/buildtools/build_wxwidgets.py", line 375, in main
    "Error running configure")
  File "/home/wxPython-4.0.4/buildtools/build_wxwidgets.py", line 85, in exitIfError
    raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure

---缺少依赖libtiff-dev

3.64.0.4Command '"/usr/local/bin/python3" /home/wxPython-4.0.4/bin/waf-2.0.8 --wx_config=/home/wxPython-4.0.4/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/local/bin/python3" --out=build/waf/3.6/gtk3 configure build ' failed with exit code 1.
3.64.1.0The configuration failed
(complete log in /home/wxPython-4.1.0/build/waf/3.6/gtk3/config.log)
3.64.2.0Traceback (most recent call last):
  File "build.py", line 44, in <module>
    from buildtools.config  import Config, msg, opj, posixjoin, loadETG, etg2sip, findCmd, \
  File "/home/wxPython-4.2.0/buildtools/config.py", line 30, in <module>
    from attrdict import AttrDict
ModuleNotFoundError: No module named 'attrdict'
3.64.2.1The python version is too old, expecting (3, 7, 0)
(complete log in /home/wxPython-4.2.1/build/waf/3.6/gtk3/config.log)

2、系统自带python3.7安装wxpython-4.0.4或者wxpython-4.0.7,需要libtiff-dev包,否则报错:

ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "build.py", line 1321, in cmd_build_wx
    wxbuild.main(wxDir(), build_options)
  File "/home/wxPython-4.0.4/buildtools/build_wxwidgets.py", line 375, in main
    "Error running configure")
  File "/home/wxPython-4.0.4/buildtools/build_wxwidgets.py", line 85, in exitIfError
    raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0m8.583s)
Finished command: build (0m8.583s)

但安装wxPython-4.1.0,不需要这个包。


http://www.kler.cn/news/150315.html

相关文章:

  • ubuntu下训练自己的yolov5数据集
  • C++ 通过CryptoPP计算Hash值
  • 从0开始学习JavaScript--JavaScript 工厂模式
  • Nginx 实现动静资源分离和负载均衡
  • 数据库系统原理——备考计划2:数据库系统的概述
  • EasyRecovery数据恢复软件好不好用?有哪些功能
  • docker 中的–mount 和-v 参数有啥区别
  • gRPC之grpc负载均衡(resolver)
  • 升级openssh以及回滚,telnet远程链接
  • 园区智能配电系统(电力智能监控系统)
  • tomcat调优配置
  • F. Magic Will Save the World
  • CSS3样式详解之圆角、阴影及变形
  • 创建conan包-不同/相同repo中的配方和来源
  • 引领Serverless构建之路,亚马逊云科技re:Invent 2023首日主题演讲重磅发布
  • AIGC: 关于ChatGPT中输出表格/表情/图片/图表这些非文本的方式
  • 移动开发新风向?HarmonyOS、车载、音视频、flutter
  • 精调llama模型
  • Kubernetes之kubeadm集群监控篇—node-exporter部署
  • 优雅退出:避免Spring Boot应用程序在推出JVM时的DestroyJavaVM异常
  • 外汇天眼:外汇市场中的“双向交易”是什么意思?
  • Golang中WebSocket和WSS的支持
  • 芯片及设计制造 - 小记
  • Could NOT find resource [logback-test.xml]
  • 激光切割机切割工件出现锯齿是什么原因?
  • RHCSA---基本命令使用
  • Linux高级IO
  • 利用pytorch实现卷积形式的ResNet
  • win10 下 mvn install 报错:编码GBK不可映射字符
  • vue项目运行时,报错:ValidationError: webpack Dev Server Invalid Options