【发布时间】:2017-03-28 01:44:32
【问题描述】:
我需要安装 python3-tk 才能使用 matplotlib。
I have tried:
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$ sudo yum install python3-tk
[sudo] password for lpuggini:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.clouvider.net
* epel: epel.check-update.co.uk
* extras: mirror.sov.uk.goscomb.net
* updates: mirrors.clouvider.net
No package python3-tk available.
Error: Nothing to do
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$
但它不起作用。
我该如何解决?
编辑: 从 pip 安装不起作用:
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$ pip install pygtk
Collecting pygtk
Using cached pygtk-2.24.0.tar.bz2
Complete output from command python setup.py egg_info:
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nzjsuhx3/pygtk/
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$
【问题讨论】:
-
为你的 python 3.4 安装和使用 python-pip。
-
我已经尝试从 pip 安装,但它不起作用。什么是正确的命令?
-
大多数 Linux 都使用 Python 安装了 tk,因此您不必安装。你在 Python 中检查了
import tkinter吗?
标签: python matplotlib tkinter centos