'Tcl wasn't installed properly' on python test workflow
See original GitHub issueI got a couple of workflow running on a matrix of (windows, macOS, ubuntu)
with python (3.7, 3.8, 3.9, 3.10)
. Randomly, some of the windows tests will fail when trying to show matplotlib figures with the error message:
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
E _tkinter.TclError: Can't find a usable init.tcl in the following directories:
E {C:\hostedtoolcache\windows\Python\3.7.9\x64\tcl\tcl8.6}
E
E C:/hostedtoolcache/windows/Python/3.7.9/x64/tcl/tcl8.6/init.tcl: couldn't read file "C:/hostedtoolcache/windows/Python/3.7.9/x64/tcl/tcl8.6/init.tcl": No error
E couldn't read file "C:/hostedtoolcache/windows/Python/3.7.9/x64/tcl/tcl8.6/init.tcl": No error
E while executing
E "source C:/hostedtoolcache/windows/Python/3.7.9/x64/tcl/tcl8.6/init.tcl"
E ("uplevel" body line 1)
E invoked from within
E "uplevel #0 [list source $tclfile]"
E
E
E This probably means that Tcl wasn't installed properly.
Any idea how to solve this and make it work 100% of the time? It looks to me like Python is not always correctly setup by:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Python tcl is not installed properly - Stack Overflow
This probably means that Tcl wasn't installed properly. What does it mean? What can I do? PS: I am using Eclipse (PyDev) for...
Read more >Tcl wasn't installed properly - Google Groups
I'm a frequent user of matplotlib on my Windows XP machine. I recently attempted to install a program that modified my Tcl installation,...
Read more >List of messages - Python tracker
I'll give ActiveTcl a try to see if theirs is more stable. ... I'm not sure if it's intended to be a supported...
Read more >Python Virtual Environments: A Primer
In this tutorial, you'll learn how to work with Python's venv module to create and manage separate virtual environments for your Python ......
Read more >Azure pipeline is failing randomly when using `plt.subplots ...
tcl ": No error E while executing E "uplevel #0 [list source $tclfile]" E E ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mscheltienne it seems that it was fixed in the 3rd party library, and was not directly related to the task itself. Please feel free to re-open the issue if it still exits.
This discussion suggests setting the
matplotlib
backend prior to plotting helps: