python - 在 PyCharm 社区版中安装 mysql
问题描述
我之前找不到这个问题,这让我发疯。如果这个问题是重复的,如果有人能指出我的答案,我将不胜感激。
我尝试pip install mysql
使用 Python 3.6 在 PyCharm 终端中安装 mysql(使用)。这是我得到的错误。我已经将 pip 更新到了最新版本。
命令“C:\Users\David\PycharmProjects\cryptocurrency2\cryptocurrencytrading\Scripts\python.exe -u -c”导入设置工具,标记化;file ='C:\Users\David\AppData\Local\Temp\pip-install-alqyprfu\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\David\AppData\Local\Temp\pip-record-gcaxj074\install-record.txt --single-version-externally-managed --compile --install -headers C:\Users\David\PycharmProjects\cryptocurrency2\cryptocurrencytrading\include\site\python3.6\mysqlclient" 在 C:\Users\David\AppData\Local\Temp\pip-install-alqyprfu\ 中出现错误代码 1 失败mysqlclient\ 您使用的是 pip 版本 10.0.1,但版本 18.1 可用。您应该考虑通过“python -m pip install --upgrade pip”命令进行升级。
解决方案
您可以使用 PyCharm 的包管理器在没有 pip 的情况下安装 python 包。请参考他们的官方文档关于安装包here
或者您也可以始终使用您的操作系统 cmd 显式安装软件包。
我建议您应该通过以下方式更新您的 pip 版本:
python -m pip install --upgrade pip
希望这可以帮助!
推荐阅读
- java - 如何改变 JavaFX AreaChart 的外观
- c# - 实体框架代码优先级联删除具有多个外键的表
- ruby-on-rails - 已删除 gem 'webpack' 但在 Heroku 上不断出错
- html - 如何在居中标题的开头动态定位段落
- javascript - console.log() 输出一个其他值而不是它应该的值
- node.js - Angular 5:不自动显示更新的数据
- javascript - 为什么 div DOM 对象没有高度和宽度属性
- postgresql - 如何使用 && 运算符 postgres 将数组按最多包含到较少排列
- java - 如何使用 RSocket 创建文件发送客户端/服务器?
- maven - 使用 mvn 版本时如何强制任意父版本:update-parent?