TKinter in a Virtualenv

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

    In case this helps those scratching their heads after reading through all the answers here - it also seems that you might need to re-create your virtualenv in case you created it before installing python3.6-tk. None of the solutions with specifying TK_PATH and TCL_PATH seemed to work, even when using the paths given by tkinter outside the virtual environment (see this post). To be sure, just delete the venv and create a new one.

提交回复
热议问题