issue: running Python matplotibfrom a virtual Windows environment, as reported and discussed by Github ticket 93 , and the corresponding proposed fix here .
Code ( myp.py):
import matplotlib.pyplot as pl
import Tkinter as tk
pl.plot(mydata['foo'],mydata['bar'],'*')
Tcl error:
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
C:/Python27/lib/tcl8.5 C:/Users/Remi/MyVirtEnv/lib/tcl8.5....(ect)
Fix attempt 1: as suggested in the ticket above, I added the following env. variables to the path in the batch file activate.batlocated in C:/Users/Remi/MyVirtEnv/Scripts/:
set "TCL_LIBRARY=C:\Python27\tcl\tcl8.5"
set "TK_LIBRARY=C:\Python27\tcl\tk8.5"
Not allowed this way. Potentially relevant information: using an PyCharmIDE with the following configuration:
Environment variables: PYTHONUNBUFFERED=1
Python interpreter: python 2.7.10 virtualenv at C:\Users\Remi\MyVirtEnv
"buttons checked": Add content roots and Add source roots to PYTHONPATH
Any help I could get would be greatly appreciated.