![]() ![]() One example of the error I get when using pytest -vv (verbose mode) is shown below: E + new_fig = plt.figure()Į + File "C:\Program Files\Python310\lib\site-packages\matplotlib\pyplot.py", line 787, in figureĮ + File "C:\Program Files\Python310\lib\site-packages\matplotlib\pyplot.py", line 306, in new_figure_managerĮ + return _backend_mod.new_figure_manager(*args, **kwargs)Į + File "C:\Program Files\Python310\lib\site-packages\matplotlib\backend_bases.py", line 3494, in new_figure_managerĮ + return cls.new_figure_manager_given_figure(num, fig)Į + File "C:\Program Files\Python310\lib\site-packages\matplotlib\backends\_backend_tk.py", line 925, in new_figure_manager_given_figureĮ + window = tk.Tk(className="matplotlib")Į + File "C:\Program Files\Python310\lib\tkinter\_init_.py", line 2299, in _init_Į + self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)Į + _tkinter.TclError: Can't find a usable init.tcl in the following directories:Į + "Į + This probably means that Tcl wasn't installed properly. The error is always triggered on a plt.figure() call. I tried commenting out the plt.close('all') and also no change. Based on other answers online, I've tried copying the tcl/tcl8.6 and tcl/tk8.6 directories to Lib and no change. CH ChamudPathirana Created on NovemWindows 10 is not installed properly I downloaded Windows 10.But when I was going to install it 'Setup couldn't start properly.Please reboot your PC and try running Windows 10 Setup again' was appeared. My Python packages are all installed for all users (so at c:/program files/python310/Lib using an administrator cmd prompt). Different tests fail, and sometimes none of them fail. When running these tests, 1 or 2 out of 20 will randomly fail with an error that claims a file in tcl8.6 or tk8.6 doesn't exist even though it does (often a different file each time). In testing mode, I call plt.close('all') instead of plt.show() so that I don't have to manually close any windows while testing - that's the only difference in testing mode. /rebates/&252fxtrafinder-was-not-installed-properly. This code is using cmd2 so the tests are calling cmd2 commands using cmd2-ext-test. I am building a set of pytest tests that cover code which normally outputs plots using matplotlib (backend="TkAgg"). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |