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

ubuntu安装wxpython库

概述

为了做一个小程序,要用到wxpython这个库,所以就需要安装下,因为我是使用pyenv去管理python的,所以安装这个库就使用pip安装了,系统是ubuntu16.04,python版本是2.7.14

操作

首先使用下面命令安装wxpython
pip install -U wxPython
报错

configure: error:
    The development files for GTK+ were not found. For GTK+ 2, please
    ensure that pkg-config is in the path and that gtk+-2.0.pc is
    installed. For GTK+ 1.2 please check that gtk-config is in the path,
    and that the version is 1.2.3 or above. Also check that the
    libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
    --libs' are in the LD_LIBRARY_PATH or equivalent.

安装下面这个库才可以解决
sudo apt-get install libgtk-3-dev
之后重新执行安装命令,又报错
configure: error: OpenGL libraries not available
安装下面这个包再重新执行安装命令
sudo apt install freeglut3-dev
接着又报错

checking for GST... configure: WARNING: GStreamer 1.0 not available, falling back to 0.10     
checking for GST... configure: WARNING: GStreamer 0.10 not available, falling back to 0.8     
configure: error: GStreamer not available     
Error running configure     
ERROR: failed building wxWidgets

安装下面这个包再重新执行安装命令
sudo apt install libgstreamer-plugins-base1.0-dev
接着安装的时候又报错,这个报错无解

    Checking for header Python.h                                                                                                        : :-(
    Asking python-config for pyembed --cflags flags                                                                                     : yes
    Asking python-config for pyembed --libs flags                                                                                       : yes
    Asking python-config for pyembed --ldflags flags                                                                                    : yes
    Getting pyembed flags from python-config                                                                                            : yes
    Asking python-config for pyext --cflags flags                                                                                       : yes
    Asking python-config for pyext --libs flags                                                                                         : yes
    Asking python-config for pyext --ldflags flags                                                                                      : yes
    Getting pyext flags from python-config                                                                                              : Could not build python extensions

如果有知道的告诉我下,其实上面的这些依赖关系官方都说明了

You will need the following packages (please consult your distributions package list for the appropriate names) and their dependencies:

python-dev (for your version of python)
gtk (preferably version 3, but depends on your needs)
gstreamer
glut
webkitgtk (matching your gtk version)

地址: https://wxpython.org/blog/2017-08-17-builds-for-linux-with-pip/index.html

而且在ubuntu安装wxpython的话有ubuntu的版本的,直接运行下面的命令安装就好了

pip install -U \
    -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
    wxPython

欢迎关注Bboysoul的博客www.bboysoul.com
Have Fun

相关文章:

  • golang学习笔记(1):安装helloworld
  • 第 9 章 Spring Security
  • 一个字符串转换类
  • Ubuntu 16.04 LTS国内快速更新源
  • 考过网工的心得
  • 8.3. Spring Cloud 相关的 application.properties 配置
  • 大数据与云计算学习:数据分析(二)
  • 3.4 usermod命令 3.5 用户密码管理 3.6 mkpasswd命令
  • 剑指offer 矩阵覆盖
  • 从0开始弄一个面向OC数据库--终结篇
  • C++ Exercises(一)
  • restful+springmvc+mybatis+ webservice 分布式架构
  • 有歧义(AMBIGUOUS LAYOUT)的约束布局调试方法2
  • CSU-ACM2018寒假集训选拔-入门题
  • 云数据库 Redis 版功能特性
  • 《Java编程思想》读书笔记-对象导论
  • 【从零开始安装kubernetes-1.7.3】2.flannel、docker以及Harbor的配置以及作用
  • 【跃迁之路】【699天】程序员高效学习方法论探索系列(实验阶段456-2019.1.19)...
  • JavaScript 奇技淫巧
  • JavaScript标准库系列——Math对象和Date对象(二)
  • Laravel核心解读--Facades
  • Python - 闭包Closure
  • scala基础语法(二)
  • 彻底搞懂浏览器Event-loop
  • 官方解决所有 npm 全局安装权限问题
  • 简单易用的leetcode开发测试工具(npm)
  • 力扣(LeetCode)22
  • 利用DataURL技术在网页上显示图片
  • 浅谈Golang中select的用法
  • 体验javascript之美-第五课 匿名函数自执行和闭包是一回事儿吗?
  • elasticsearch-head插件安装
  • # MySQL server 层和存储引擎层是怎么交互数据的?
  • (16)UiBot:智能化软件机器人(以头歌抓取课程数据为例)
  • (4)事件处理——(7)简单事件(Simple events)
  • (SpringBoot)第七章:SpringBoot日志文件
  • (二)hibernate配置管理
  • (仿QQ聊天消息列表加载)wp7 listbox 列表项逐一加载的一种实现方式,以及加入渐显动画...
  • (黑客游戏)HackTheGame1.21 过关攻略
  • (南京观海微电子)——I3C协议介绍
  • (一)SpringBoot3---尚硅谷总结
  • (转)VC++中ondraw在什么时候调用的
  • (转贴)用VML开发工作流设计器 UCML.NET工作流管理系统
  • *Algs4-1.5.25随机网格的倍率测试-(未读懂题)
  • ../depcomp: line 571: exec: g++: not found
  • .NET Core 2.1路线图
  • .NET DevOps 接入指南 | 1. GitLab 安装
  • .Net 中Partitioner static与dynamic的性能对比
  • .NET 中让 Task 支持带超时的异步等待
  • .NET 自定义中间件 判断是否存在 AllowAnonymousAttribute 特性 来判断是否需要身份验证
  • .NET/C# 阻止屏幕关闭,阻止系统进入睡眠状态
  • .net流程开发平台的一些难点(1)
  • @ConfigurationProperties注解对数据的自动封装
  • [ACM] hdu 1201 18岁生日
  • [AutoSAR系列] 1.3 AutoSar 架构
  • [C#基础知识系列]专题十七:深入理解动态类型