无需root访问权限即可安装Tkinter [英] Install Tkinter without root access

查看:68
本文介绍了无需root访问权限即可安装Tkinter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在没有root特权的情况下在Linux系统上安装Tkinter时遇到麻烦.根据此问题的第二个答案:为Python安装tkinter 有一种方法,它可以涉及下载Tkinter和TCL的源代码,然后在主目录下一级创建的custon目录中运行其安装例程.我做了所有的事情,除了最后一步说的是运行setup.py build和setup.py install.我在任何地方都找不到这些文件,也无法建立它们.有谁知道这个例程的最后提示是什么,并且有可能对此进行解释吗?谢谢.

作为参考:一旦拥有tar文件,安装源的说明顺序如下:

  cd〜/tcl8.5.11/unix./configure --prefix =/home/< user>--exec-prefix =/home/< user>制作进行安装cd〜/tk8.5.11/unix./configure --prefix =/home/< user>--exec-prefix =/home/< user>--with-tcl =/home/<用户>/tcl8.5.11/unix制作进行安装 

解决方案

没有足够的声誉点可以发表评论,但不是这个问题Install tkinter for Python there is a way, and it involves downloading the source of Tkinter and TCL and then running their install routines in custon directories created one level below the home directory. I did that and everything except for the last step where it says run setup.py build and setup.py install. I can't find these files anywhere, an can't build them either. Does anyone know what the lasts tep of this routine is, and could possibly expound upon it? Thanks.

For reference: the sequence of instructions for installing the sources once you have the tar files is the follwing:

cd ~/tcl8.5.11/unix
./configure --prefix=/home/<user> --exec-prefix=/home/<user>
make
make install

cd ~/tk8.5.11/unix
./configure --prefix=/home/<user> --exec-prefix=/home/<user> --with-tcl=/home/<user>/tcl8.5.11/unix
make
make install

解决方案

don't have sufficient reputation points to comment, but isn't this question Install Tkinter in linux similar to yours??.

To summarize, if you are sure that Tkinter is not already installed (and not that your python path is not correctly configured), I would suggest you to use some tools like easy_install and then do

easy_install --prefix=<local-dir-in-python-path> python-tk

generally I use ~/.local/ as the prefix.

easy_install can be installed by installing setuptools

这篇关于无需root访问权限即可安装Tkinter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆