擅长:python、mysql、java
<p>基于<a href="https://stackoverflow.com/questions/51294268/pip-install-mysqlclient-returns-fatal-error-c1083-cannot-open-file-mysql-h">this Answer</a>,您可以使用<a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient" rel="nofollow noreferrer">https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient</a>下载python版本的非官方windows二进制文件。例如,“mysqlclient‑1.3.13‑cp36‑cp36m‑win\u amd64.whl”。
然后用pip安装。你知道吗</p>
<pre><code>pip install "path to the downloaded .whl file"
</code></pre>
<p><strong>注意:</strong>在控制盘的名称中,有一些数字显示此控制盘适用于哪个python版本。例如,如果只有python<strong>版本3.6</strong>,则可以使用“mysqlclient‑1.3.13‑cp36‑cp36m</strong>-win\u amd64.whl”。
毕竟,如果仍然有错误,请尝试32位版本的控制盘。你知道吗</p>