我正在使用以下库和代码探索树图:
from dsplot.graph import Graph
graph = Graph(
{0: [1, 4, 5], 1: [3, 4], 2: [1], 3: [2, 4], 4: [], 5: []}, directed=True
)
graph.plot()
Run Code Online (Sandbox Code Playgroud)
当我运行代码时,出现以下错误:
from dsplot.graph import Graph
ModuleNotFoundError: No module named 'dsplot'
Run Code Online (Sandbox Code Playgroud)
我尝试dsplot在 PyCharm 终端上使用以下命令 pip 安装库:
pip install dsplot
Run Code Online (Sandbox Code Playgroud)
但这会导致另一个错误:
Collecting dsplot
Using cached dsplot-0.9.0-py3-none-any.whl (8.8 kB)
Collecting pygraphviz<2.0,>=1.7
Using cached pygraphviz-1.12.tar.gz (104 kB)
ERROR: Error [WinError 3] The system cannot find the path specified while executing command pip subprocess to install …Run Code Online (Sandbox Code Playgroud)