Install Tkinter without root access

纵然是瞬间 提交于 2020-01-15 08:43:07

问题


I'm having a bit of trouble trying to install Tkinter on a Linux system without having root privileges. According to the second answer to this question: 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

回答1:


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



来源:https://stackoverflow.com/questions/16902038/install-tkinter-without-root-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!