简体   繁体   中英

Cannot find tk.h despite having the dev packages installed

I am trying to install wck . But I ran into the following error when running setup.py :

fatal error : tk.h : no such file or directory

But I already have all the -dev packages installed! I went on and installed tk-dev, tk8.5-dev and tk8.4-dev and the problem persists. I did a 'locate tk.h' and there was no tk.h anywhere in my system. Wherever this problem was reported, people were trying to get tcl.h too. So I did a sudo apt-get install tcl-dev and did a 'locate tcl.h'. Nothing! Where did all the header files go?

Your problem is, that WCKs setup.py and setuplib.py don't have a clue where to look with the layout on your system, so you will have to fix those to get it working.

I assume your using some variant of Debian Linux there, so maybe have a look at their guidelines for packaging Tcl/Tk.

Basically they recommend adding configure switches like:

    --with-tcl=/usr/lib/tclX.Y
    --with-tk=/usr/lib/tkX.Y
    --with-tclincludes=/usr/include/tclX.Y

http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/ap-debian_oddities.html

http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/ch-tcltk.html

With that info, you might be able to get it to work by editing setup.py and simply adding a version of find_tk() that works for your system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM