TKinter in a Virtualenv

前端 未结 9 1724
北荒
北荒 2020-12-05 00:27

Trying to run python code with TKinter-based widgets from a virtualenv.

    user@computer:~/myproject$ env/bin/python Python
    2.7.3 (default, Sep 26 2012,         


        
9条回答
  •  清歌不尽
    2020-12-05 00:41

    This is really an update to the great answer from A. Rodas for use with Python 3.4 and Tcl 8.6 (I don't have enough reputation points to comment).

    Set the environment variable TCL_LIBRARY in your activate script. On Windows (Python 3.4 with Tcl 8.6), just add this line to Scripts\activate.bat:

    set "TCL_LIBRARY=C:\Python34\tcl\tcl8.6"
    

    I came across this issue while using Windows 7, Python 3.4, and ggplot in a virtual environment.

提交回复
热议问题