添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

When running the pythoncaller I got an error:

"Can't find a usable init.tcl in the following directories:"

And no directories were actually mentioned, how helpful...

The error came when it hit a line using matplotlib, it starts to create the figure

"fig, ax = plt.subplots(figsize=(15, 10))".

How can I fix that?

I thought it was something horrible related to the tkinter install setup, environment variables, wrong versions, etc as I was using an alternative python interpreter, not the python 3.7 that comes with FME Desktop as I couldn't install all the modules I wanted with that one.

Answer:

Edit the Python module imports for matplotlib to add the 2 lines in bold:

import matplotlib

matplotlib.use('Agg')

import matplotlib.pyplot as plt

import matplotlib.colors as clr

Apparently it has something to do with interactive and non interactive plotting.

I'm answering my own question now as don't know if there is a reputation requirement. And just generally for others if they encounter it and start getting worried about tcl, tkinter, etc

Scanning file for viruses.

Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.

This file cannot be downloaded

Sorry, our virus scanner detected that this file isn't safe to download.