擅长:python、mysql、java
<p>安装MySQL包和依赖项</p>
<p><strong>Ubuntu</strong></p>
<pre><code> sudo apt-get install python-pip python-dev libmysqlclient-dev
</code></pre>
<p><strong>Mac操作系统</strong></p>
<pre><code> brew install mysql-connector-c
</code></pre>
<p>使用<strong>PIP</p>
<pre><code> pip install MySQL-python
</code></pre>
<p>在Python 3中,ConfigParser已重命名为ConfigParser。您正在安装的包不支持Python3。</p>
<p>所以在Python 3中</p>
<pre><code>pip install configparser
</code></pre>
<p>在python 2中</p>
<pre><code>pip install ConfigParser
</code></pre>