Python, Virtualenv and Tkinter
21 Aug 2013A coworker was running into problems installing Matplotlib under virtualenv; while running "pip install", he saw this error:
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld:
cannot find -ltcl
A complication was that he was using Enthough Python; when he used that directly, rather than under virtualenv, it worked just fine.
In the end it turned out to be a long-standing bug in virtualenv. This StackExchange question produced the solution, which is to add these lines to the activate script in the virtualenv:
ENTHOUGHT=/path/to/enthought
TK_LIBRARY=${ENTHOUGHT}/lib/python2.7/lib-tk:${ENTHOUGHT}lib/python2.7/site-packages/PIL
TKPATH=${ENTHOUGHT}/lib/python2.7/lib-tk:${ENTHOUGHT}/lib/python2.7/lib-tk
TCL_LIBRARY=${ENTHOUGHT}/lib/tcl8.5/
export TCL_LIBRARY TK_LIBRARY TKKPATH
Re-source the activate script, and all is well.
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018