Я работаю с Graphviz, используя Python 3 на Sublime Text 3. Когда я запускаю этот код:
data = tree.export_graphviz(dtGini[55], out_file = None)
graph = graphviz.Source(data)
graph.render("testingthis")
Я получаю следующие ошибки:
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
graphviz.backend.ExecutableNotFound: failed to execute ['dot', '-Tpdf', '-O', 'testingthis'], make sure the Graphviz executables are on your systems' PATH
Похоже, что можетне могу найти нужные файлыВ Sublime Text 3 мои пользовательские настройки для Conda:
{
// executable is the path to anaconda's python
// this python executable is used in order to find conda
"executable": "C:/ProgramData/Miniconda3/python.exe",
// Directory in which the conda envs are stored
// Default location is the user's home directory
"environment_directory": "C:/ProgramData/Miniconda3/envs",
// configuration is the path to conda's configuration file
"configuration": "~/.condarc"
}
У меня есть следующие переменные окружения из моей панели управления:
C:\ProgramData\Miniconda3\Scripts\
C:\ProgramData\Miniconda3\
C:\ProgramData\Miniconda3\conda-meta\history
C:\Users\X\AppData\Local\conda\conda\pkgs
C:\Users\X\AppData\Local\conda\conda\pkgs\graphviz-2.38-hfd603c8_2\Library\bin
C:\Users\X\AppData\Local\conda\conda\pkgs\graphviz-2.38-hfd603c8_2\Library\bin\dot.exe
В приглашении Anaconda, когда я вхожу в Python,нажмите ввод, а затем введите «импортировать графвиз», я не получаю ошибку.В Sublime Text 3, если у меня просто есть файл наподобие graph.py
import graphviz
Он выполняется без ошибок.
Есть идеи, как мне это решить?Это сводит меня с ума.Спасибо!