请问安装mysqlclient只是为了简化命令python manage.py吗?我在操作时,更改了DATABASES中的内容时就会提示:Did you install mysqlclient or MySQL-python?
执行安装mysqlclient命令(视频中pip3 install mysqlclient,为什么是pip3,我试了pip install mysqlclient,好像效果都一样,没能安装成功,提示的错误也一样,如下:)
(venv) D:\PycharmProjects\zhuce>pip3 install mysqlclient
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post
1.tar.gz
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command D:\PycharmProjects\zhuce\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ThinkP
ad\\AppData\\Local\\Temp\\pip-install-a58bcz2e\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ThinkPad\AppData\Local\Temp\pip-record-j4b8_u4b\install-record
.txt --single-version-externally-managed --compile --install-headers D:\PycharmProjects\zhuce\venv\include\site\python3.6\mysqlclient:
C:\Users\ThinkPad\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'long_descr
iption_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.6\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.6\MySQLdb
creating build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.6\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.6\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-
build-tools
----------------------------------------
Command "D:\PycharmProjects\zhuce\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ThinkPad\\AppData\\Local\\Temp
\\pip-install-a58bcz2e\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(co
mpile(code, __file__, 'exec'))" install --record C:\Users\ThinkPad\AppData\Local\Temp\pip-record-j4b8_u4b\install-record.txt --single-version-ex
ternally-managed --compile --install-headers D:\PycharmProjects\zhuce\venv\include\site\python3.6\mysqlclient" failed with error code 1 in C:\Us
ers\ThinkPad\AppData\Local\Temp\pip-install-a58bcz2e\mysqlclient\
You are using pip version 10.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.