Python 安装

在centos6.5下  安装python3.5.3
下载python3.5.3.tar.gz

./configure
make && make install

make的时候发生错误
提示INFO: Can't locate Tcl/Tk libs and/or headers

安装tcl 和tk包
直接用yum install tcl  ,
yum install tk

安装完毕后任然出错,

仔细看python.org/topics/tkinter/给出的指导:

You may have to install Tcl and Tk(when using RPM, install the –devel RPM as well) and /or edit the setup.py script to point to the right locations where Tcl/Tk is installed. If you install Tcl/Tk in the default locations, simply rerunning “make” should build the _tkinter extension.

所以我要安装tcl-devel 和tk-devel(我的系统是debian安装的是tk-dev)才能有头文件,

然后我就执行了

apt-get install tcl-devel

apt-get install tk-devel

安装完这两个包后问题就解决了。。。


猜你喜欢

转载自ananbb.iteye.com/blog/2372926
今日推荐