由于本人也是初学Python和django。本人使用的Python版本是3.7所以连接MySQL数据库需要安装数据驱动,对应Python3的数据驱动是mysqlclient。因此本人习惯性的使用命令pip install mysqlclient,结果安装失败
(venv) C:\Users\songlihui\PycharmProjects\autotest>pip install mysqlclient
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command C:\Users\songlihui\PycharmProjects\autotest\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SONGLI~1\\AppData\\Local\
\Temp\\pip-install-1yliga_x\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" i
nstall --record C:\Users\SONGLI~1\AppData\Local\Temp\pip-record-d20e0g2u\install-record.txt --single-version-externally-managed