Solve the problem of drawing error with Python graphviz package
Finally, you need to restart pycharm to draw normally.
1. Error reporting
The error information is as follows:
graphviz.backend.ExecutableNotFound: failed to execute 'dot'make sure the Graphviz executables are on your systems' PATH
2. Determine variable type
The program prints variable data types plotted using graphviz
The print result shows that the type of drawing you want to draw is & lt; class ‘graphviz.dot.Digraph’>
3. Settle
3.1 Windows System Download and install graphviz
Graphviz download link to find the appropriate number of bits to download. Run the MSI file and install graphviz
3.2 configuring environment variables
Find the bin folder under the installation directory, copy the path, such as “D: \ software \ graphviz \ bin”, configure the system environment variable path, and create a new record for it. The content is the path copied in the previous step, as shown in Figure:
3.3 restart pycharm
After restart, use the. View () command to draw and display the image normally
. view() parameter explanation:
filename: picture name. The default is digraphv.gv. You can specify
Directory: picture saving path. The default is to save in the current path. You can specify
Run the code and view the image
Read More:
- ExecutableNotFound: failed to execute [‘dot’, ‘-Tsvg’], make sure the Graphviz executables are on yo
- [Keras] ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to
- Installation and use of graphviz under mac
- Make sure the graphviz executables are on your systems’ path
- How to Solve Error: Failed to execute goal org.codehaus.mojo:……..
- tensorflow.python.framework.errors_impl.InternalError: Failed to create session.
- Solve the error in Ubuntu 18.04: called “net usershare info” but it failed: failed to execute child process “net”
- Solve the problem of unable to locate package python3.6 when upgrading from python3.5 to python3.6 in ubantu16.04
- Error in Python connection to mongodb pymongo.errors.OperationFailure : Authentication failed.
- Solve the problem of prompt couldn’t find path to unrear library after installing unrear in Python
- Solve the problem of garbled code when Python connects to ADB
- Configuration (9) to solve the problem of “setup tools PIP wheel failed with error code 1”, create virtual environments with Python of anaconda
- How to Solve Ubuntu18 Compile Kalibr Error (Various Errors)
- How to use C # to get image format without system. Drawing. Common
- How to Solve Yolov5 Common Error (Three Errors)
- Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using’”‘ in pip installation
- Solution to abnormal errors during startup of Python’s Anaconda
- Methods to avoid fail to allocate bitmap errors in pyplot
- Failed to execute goal
- python: This application failed to stat could not find or load the Qt platform plugin “windows”