擅长:python、mysql、java
<p>多亏了@Anwarvic和@bruno,我想出了解决这个问题的办法</p>
<p>首先,在<code>Client</code>文件夹中创建空的<code>__init__.py</code>文件:</p>
<pre><code>(venv) C:\Users\User\Desktop\project\Client> type NUL > __init__.py
</code></pre>
<p>然后转到<code>Client</code>文件夹的父文件夹,在那里我想要得到类图:</p>
<pre><code>(venv) C:\Users\User\Desktop\project> pyreverse Client -o png
</code></pre>
<p>但我有一个错误:</p>
<pre><code>The output format 'png' is currently not available.
Please install 'Graphviz' to have other output formats than 'dot' or 'vcg'.
</code></pre>
<p>在一些发现之后,我发现了这个<a href="https://stackoverflow.com/a/50839974/9500955">solution</a>。然后我可以运行<code>pyreverse</code>而不会出现任何错误</p>
<p>这是我使用<code>pyreverse</code>得到的类图:</p>
<p><a href="https://i.stack.imgur.com/i8OfO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i8OfO.png" alt="enter image description here"/></a></p>