如何在Python 3支持下安装PyGObject

编程入门 行业动态 更新时间:2024-10-26 00:28:28
本文介绍了如何在Python 3支持下安装PyGObject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直在尝试使用多种方法来安装PyGObject.首先,使用 apt-get ,但这仅适用于Python2.x.接下来,我尝试自己编译它,但是在将其编译为Python 3时遇到了问题.

I've been trying to install PyGObject using a variety of methods. First, using apt-get but that only installs it for Python 2.x. Next I attempted to compile it myself but I have been having problems getting it to compile for Python 3.

有人知道如何安装吗?

推荐答案

首先,您需要安装python3和开发标头.

First you need to install python3 and the development headers.

然后您需要告诉configure使用python3:

Then you need to tell configure to use python3:

PYTHON=python3 ./configure

编译并正常安装

make make install

然后您应该能够使用python3中的pygobject.

You should then be able to use pygobject from python3.

更多推荐

如何在Python 3支持下安装PyGObject

本文发布于:2023-07-03 21:59:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1012567.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:支持下   如何在   Python   PyGObject

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!