Don*_*beo 11 python centos tkinter matplotlib
我需要安装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 ~]$
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我该如何解决?
编辑:从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 ~]$
Run Code Online (Sandbox Code Playgroud)
Chi*_*and 15
tkinter在coreos中作为tkinter包提供.你可以安装它
sudo yum install tkinter
Run Code Online (Sandbox Code Playgroud)
完成后,您可以像往常一样导入和使用它.
>>> import tkinter
>>> tkinter._test()
Run Code Online (Sandbox Code Playgroud)
对于Python 3,您可以使用它进行安装
sudo yum install python3-tkinter
Run Code Online (Sandbox Code Playgroud)
正如一些用户所提到的,它可以作为python36u-tkinter或python34-tkinter取决于操作系统.
sudo yum install python34-tkinter
sudo yum install python36u-tkinter
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19031 次 |
| 最近记录: |