swx934
V2EX  ›  问与答

需要安装 pip install gtk,但是提示失败

By swx934 at 2017 年 12 月 8 日 · 4220 次点击

需要安装"pip3 install gtk"但是 pip3 安装会失败,所以尝试去 pypip 网站下载之后本地安装,目前已经下载了并完成解压,接下来不知道怎么安装,(我用的 Ubntu )?

5 条回复  •  2017-12-08 15:03:49 +08:00
awanabe
   1
awanabe  
   2017 年 12 月 8 日
pip3 安装会失败 ---> 什么错误?

下载安装包解压 一般就是
> python setup.py build
> python setup.py install
wwqgtxx
   2
wwqgtxx  
   2017 年 12 月 8 日 via iPhone
你可能需要先安装 libgtk libgtk-dev 这种桌面库(通过系统包管理器)
swx934
   3
swx934  
OP
   2017 年 12 月 8 日
@awanabe Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-yfqlo4iq/pygtk/
swx934
   4
swx934  
OP
   2017 年 12 月 8 日
@awanabe
wilson@linux:~/Downloads/pygtk-2.24.0$ python3 setup.py install
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
wilson@linux:~/Downloads/pygtk-2.24.0$ python3 setup.py build
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
wilson@linux:~/Downloads/pygtk-2.24.0$
貌似还是不行啊?
julyclyde
   5
julyclyde  
   2017 年 12 月 8 日
@swx934 看提示信息啊
© 2026 V2EX · 29ms · 3.9.8.5