TKinter in a Virtualenv

前端 未结 9 1725
北荒
北荒 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:54

    Also an update from answer by A.Rodas - I have tried doing that in Windows 7 using Windows Powershell but wasn't able to get it done (I also do not have enough reputation points to comment

    I realized even when I added the line set "TCL_LIBRARY=C:\Python27\tcl\tcl8.5" and the corresponding one for the tk library, to the activate.bat script, the tcl link was not getting updated, and what I needed to do was just go to the directory where it's looking for the tcl files, and copy the corresponding tcl and tk files to that directory. Now the file is in the default location so you don't need to update activate.bat everytime you create a new environment

提交回复
热议问题