django - pip安装mysqlclient错误django
问题描述
我目前正在使用 MySQL 8.0 作为我的 Django 项目的数据库。我正在使用 Python 3.6 版本并已安装pip
以从 Internet 加载 python 模块。使用 pip 加载 mysqlclient 以外的包时,我没有遇到问题。
我发出了命令pip install mysqlclient
,最后得到以下消息,安装被中止:
"c:\users\anirudh\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Anirudh\\AppData\\Local\\Temp\\pip-install-xer9o7aw\\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\Anirudh\AppData\Local\Temp\pip-record-t3br6ckm\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Anirudh\AppData\Local\Temp\pip-install-xer9o7aw\mysqlclient\
我正在使用 Visual Studio 2017,并按照下面的链接解决了这个问题,但没有运气。
https://dimitri.janczak.net/2017/05/20/python-3-6-visual-studio-2017/
解决方案
我尝试mysqlclient
使用 pip 安装。但我没有成功。我能够使用以下方法安装它:
conda install mysqlclient
它对我来说很好。
推荐阅读
- installation - pywinauto 如何点击一个窗格?
- python - 有没有办法绕过 AWS Lambda 包大小限制?
- android-studio - DriverManager.getConnection("wholeurlthatshouldwork") 抛出 SQLexeption,对于一个代码它的工作,而对于第二个它不
- sql - 如何使用 wm_concat 一个查询中已经存在的列?
- regex - 为什么在 vim 中任何字符都不匹配的正则表达式?
- node.js - UnhandledPromiseRejectionWarning:错误:`receipt` 是强制性的razorpay
- c++ - CMake 时 FetchContent rabbitmq
- c# - 使用兼容的应用程序打开文件
- database - 数据建模中的 SCD-2:如何检测变化?
- jmeter - 如何执行多个 Jmeter 脚本并为这些脚本生成 html 报告