0

I am running linux and python 2.7.14 I have successfully installed the binary version of tcltk. I installed it into the same directory as python27 such that the following directories were all added in the same folders, namely: include, lib, etc. The bits were not all found when I configured python again so when I checked the setup.py file it mentioned I could do the following, which I did:

make clean

./configure --with-tcltk-includes="-I/home2/bishopk2/python27/include" --
with-tcltk-libs="-L/home2/bishopk2/python27/lib/tcllib1.18 -ltclm.n -L/ 
home2/bishopk2/python27/lib/tklib0.6 -ltkm.n"

make TCLTK_INCLUDES="/home2/bishopk2/python27/include" 
TCLTK_LIBS="/home2/bishopk2/python27/lib"

I have tried all permutations of this (i.e., with and without the tcllib1.18, ltclm.n, etc., etc.)

I am not sure the best way to share a config.log on stack overflow but here is a link:

https://www.pharmacoengineering.com/share-a-file/ (I made the pdf downloadable)

I had to save it as a pdf file so that it would upload to wordpress.

When I looked at it, I am not sure why the tcl.h file could not be found because when I:

find . -name "tcl.h"

It says that it is in my /home2/bishopk2/python27/include folder.

All of the libraries are there and it should be able to connect Tkinter with my tcl and tk libraries.

Any help would be greatly appreciated.

Best wishes,

Corey

Corey
  • 1
  • 1
  • what system do you use ? Most systems have Python already with `tkinter` and `tcl/tk` preinstalled - especially Linux. – furas Dec 24 '17 at 08:24
  • do you try to compile Python from source code ? – furas Dec 24 '17 at 08:27
  • It is a Linux x86 64. Python did have the Tkinter installed but it was not configured with my system. I am on a shared server. So in answer to your question about compiling it from source code, I am configuring it from where I installed it: ~/home2/bishopk2/python27/Python-2.7.14/./configure hopefully that clarifies things a little. Thanks for your response thus far. – Corey Dec 24 '17 at 08:46
  • Also, the Linux may have had tcltk already but it was not something I could access. I am not sure the inner workings of my server. I am a novice. I apologize I am unsure. – Corey Dec 24 '17 at 08:49

1 Answers1

0

tcllib and tklib and libraries of Tcl scripts.

To build tkinter you need to link to the binary shared object library (a .so file). This should be named libtcl8.6.so or something similar. It is not clear from your post that you realize tclM.N is a way of saying Major number, Minor number but you should put the numbers in for your installed version. So on my Debian based system I will provide --with-tcltk-includes=/usr/include/tcl8.6 --with-tcltk-libs=/usr/lib/x86_64-linux-gnu given your example. If you need to put in the library name then -ltk8.6 -ltcl8.6 (the linker drops the lib prefix from the filename.

patthoyts
  • 32,320
  • 3
  • 62
  • 93